Title: [238005] trunk/Source/WebInspectorUI
Revision
238005
Author
[email protected]
Date
2018-11-08 15:44:22 -0800 (Thu, 08 Nov 2018)

Log Message

Web Inspector: Potential for watch expressions to never show results
https://bugs.webkit.org/show_bug.cgi?id=191438

Patch by Joseph Pecoraro <[email protected]> on 2018-11-08
Reviewed by Matt Baker.

* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WI.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
If there was no object don't bail, continue and resolve the Promise.
In this case we can fallback to show `undefined`. This code might not be
reachable right now, but is wrong as is.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (238004 => 238005)


--- trunk/Source/WebInspectorUI/ChangeLog	2018-11-08 23:40:25 UTC (rev 238004)
+++ trunk/Source/WebInspectorUI/ChangeLog	2018-11-08 23:44:22 UTC (rev 238005)
@@ -1,5 +1,18 @@
 2018-11-08  Joseph Pecoraro  <[email protected]>
 
+        Web Inspector: Potential for watch expressions to never show results
+        https://bugs.webkit.org/show_bug.cgi?id=191438
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
+        (WI.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
+        If there was no object don't bail, continue and resolve the Promise.
+        In this case we can fallback to show `undefined`. This code might not be
+        reachable right now, but is wrong as is.
+
+2018-11-08  Joseph Pecoraro  <[email protected]>
+
         Web Inspector: Debugger Popover does not work when paused in Worker
         https://bugs.webkit.org/show_bug.cgi?id=191342
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js (238004 => 238005)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js	2018-11-08 23:40:25 UTC (rev 238004)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js	2018-11-08 23:44:22 UTC (rev 238005)
@@ -306,11 +306,10 @@
             promises.push(new Promise(function(resolve, reject) {
                 let options = {objectGroup: WI.ScopeChainDetailsSidebarPanel.WatchExpressionsObjectGroupName, includeCommandLineAPI: false, doNotPauseOnExceptionsAndMuteConsole: true, returnByValue: false, generatePreview: true, saveResult: false};
                 WI.runtimeManager.evaluateInInspectedWindow(_expression_, options, function(object, wasThrown) {
-                    if (!object)
-                        return;
+                    object = object || WI.RemoteObject.fromPrimitiveValue(undefined);
                     let propertyDescriptor = new WI.PropertyDescriptor({name: _expression_, value: object}, undefined, undefined, wasThrown);
                     objectTree.appendExtraPropertyDescriptor(propertyDescriptor);
-                    resolve(propertyDescriptor);
+                    resolve();
                 });
             }));
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to