Title: [227659] branches/safari-605-branch/Source/WebInspectorUI
Revision
227659
Author
[email protected]
Date
2018-01-25 21:03:13 -0800 (Thu, 25 Jan 2018)

Log Message

Cherry-pick r227572. rdar://problem/36873386

Modified Paths

Diff

Modified: branches/safari-605-branch/Source/WebInspectorUI/ChangeLog (227658 => 227659)


--- branches/safari-605-branch/Source/WebInspectorUI/ChangeLog	2018-01-26 05:03:12 UTC (rev 227658)
+++ branches/safari-605-branch/Source/WebInspectorUI/ChangeLog	2018-01-26 05:03:13 UTC (rev 227659)
@@ -1,3 +1,20 @@
+2018-01-25  Jason Marcell  <[email protected]>
+
+        Cherry-pick r227572. rdar://problem/36873386
+
+    2018-01-24  Joseph Pecoraro  <[email protected]>
+
+            ReferenceError:​ Can't find variable:​ DOMAgent (at ScriptSyntaxTree.js:​178:​22)​
+            https://bugs.webkit.org/show_bug.cgi?id=182059
+
+            Reviewed by Matt Baker.
+
+            * UserInterface/Models/ScriptSyntaxTree.js:
+            (WI.ScriptSyntaxTree.functionReturnDivot):
+            DOMAgent won't be available in a ServiceWorker or JSContext inspector. So add
+            a check for DOMAgent, and assume if DOMAgent doesn't exist that we should fall
+            back to the latest path (non-iOS 9) target.
+
 2018-01-23  Jason Marcell  <[email protected]>
 
         Cherry-pick r227463. rdar://problem/36807123

Modified: branches/safari-605-branch/Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js (227658 => 227659)


--- branches/safari-605-branch/Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js	2018-01-26 05:03:12 UTC (rev 227658)
+++ branches/safari-605-branch/Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js	2018-01-26 05:03:13 UTC (rev 227659)
@@ -175,7 +175,8 @@
         // COMPATIBILITY (iOS 9): Legacy Backends view the return type as being the opening "{" of the function body.
         // After iOS 9, this is to move to the start of the function statement/_expression_. See below:
         // FIXME: Need a better way to determine backend versions. Using DOM.pseudoElement because that was added after iOS 9.
-        if (!DOMAgent.hasEvent("pseudoElementAdded"))
+        // FIXME: This wouldn't work for debugging an iOS 9 or earlier JSContext target.
+        if (window.DOMAgent && !DOMAgent.hasEvent("pseudoElementAdded"))
             return node.body.range[0];
 
         // "f" in "function". "s" in "set". "g" in "get". First letter in any method name for classes and object literals.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to