JSContext Inspector: Broken frontend, DOMAgent is used but does not exist
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Oct 2018 23:55:12 +0000 (23:55 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Oct 2018 23:55:12 +0000 (23:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190922
<rdar://problem/45569827>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-10-25
Reviewed by Devin Rousso.

* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.requestDocument):
Feature check for agents that may not exist in a JSContext.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237435 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js

index bc472b5..50cb0a9 100644 (file)
@@ -1,3 +1,15 @@
+2018-10-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        JSContext Inspector: Broken frontend, DOMAgent is used but does not exist
+        https://bugs.webkit.org/show_bug.cgi?id=190922
+        <rdar://problem/45569827>
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Controllers/DOMManager.js:
+        (WI.DOMManager.prototype.requestDocument):
+        Feature check for agents that may not exist in a JSContext.
+
 2018-10-25  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: add corner rounding to the network timing "blocks"
index 26dc6e5..35a2f08 100644 (file)
@@ -82,7 +82,8 @@ WI.DOMManager = class DOMManager extends WI.Object
             this._pendingDocumentRequestCallbacks = null;
         }
 
-        DOMAgent.getDocument(onDocumentAvailable.bind(this));
+        if (window.DOMAgent)
+            DOMAgent.getDocument(onDocumentAvailable.bind(this));
     }
 
     ensureDocument()