Title: [227572] trunk/Source/WebInspectorUI
- Revision
- 227572
- Author
- commit-qu...@webkit.org
- Date
- 2018-01-24 14:26:17 -0800 (Wed, 24 Jan 2018)
Log Message
ReferenceError: Can't find variable: DOMAgent (at ScriptSyntaxTree.js:178:22)
https://bugs.webkit.org/show_bug.cgi?id=182059
Patch by Joseph Pecoraro <pecor...@apple.com> on 2018-01-24
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.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (227571 => 227572)
--- trunk/Source/WebInspectorUI/ChangeLog 2018-01-24 22:25:03 UTC (rev 227571)
+++ trunk/Source/WebInspectorUI/ChangeLog 2018-01-24 22:26:17 UTC (rev 227572)
@@ -1,3 +1,16 @@
+2018-01-24 Joseph Pecoraro <pecor...@apple.com>
+
+ 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 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: Network's columns shake when scrolling at non-default zoom level
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js (227571 => 227572)
--- trunk/Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js 2018-01-24 22:25:03 UTC (rev 227571)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js 2018-01-24 22:26:17 UTC (rev 227572)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes