Title: [278853] trunk/Source/WebInspectorUI
Revision
278853
Author
pan...@apple.com
Date
2021-06-14 17:46:19 -0700 (Mon, 14 Jun 2021)

Log Message

[REGRESSION: r276616] Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._setupCodeMirror.getValue')
https://bugs.webkit.org/show_bug.cgi?id=226995

Reviewed by Devin Rousso.

Audit test groups share a single setup editor for all their test cases, leaving individual test cases without
their own setup editor. In this case, we should not attempt to save the setup script for every test, and instead
allow the instance of `AuditTestGroupContentView` that does have a setup editor to save the script.

* UserInterface/Views/AuditTestContentView.js:
(WI.AuditTestContentView.prototype.saveEditedData):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (278852 => 278853)


--- trunk/Source/WebInspectorUI/ChangeLog	2021-06-14 23:40:09 UTC (rev 278852)
+++ trunk/Source/WebInspectorUI/ChangeLog	2021-06-15 00:46:19 UTC (rev 278853)
@@ -1,3 +1,17 @@
+2021-06-14  Patrick Angle  <pan...@apple.com>
+
+        [REGRESSION: r276616] Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._setupCodeMirror.getValue')
+        https://bugs.webkit.org/show_bug.cgi?id=226995
+
+        Reviewed by Devin Rousso.
+
+        Audit test groups share a single setup editor for all their test cases, leaving individual test cases without
+        their own setup editor. In this case, we should not attempt to save the setup script for every test, and instead
+        allow the instance of `AuditTestGroupContentView` that does have a setup editor to save the script.
+
+        * UserInterface/Views/AuditTestContentView.js:
+        (WI.AuditTestContentView.prototype.saveEditedData):
+
 2021-06-11  Patrick Angle  <pan...@apple.com>
 
         Web Inspector: Add instrumentation to node destruction for InspectorDOMAgent

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestContentView.js (278852 => 278853)


--- trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestContentView.js	2021-06-14 23:40:09 UTC (rev 278852)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestContentView.js	2021-06-15 00:46:19 UTC (rev 278853)
@@ -317,7 +317,8 @@
     saveEditedData()
     {
         console.assert(this.representedObject.editable, this.representedObject);
-        this.representedObject.setup = this._setupCodeMirror.getValue().trim();
+        if (this._setupCodeMirror)
+            this.representedObject.setup = this._setupCodeMirror.getValue().trim();
     }
 
     showRunningPlaceholder()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to