Web Inspector: REGRESSION(r251227): Uncaught Exception: undefined is not an object...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Oct 2019 22:05:06 +0000 (22:05 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Oct 2019 22:05:06 +0000 (22:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=203208

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/AppController.js:
(WI.AppController.prototype.activateExtraDomains):

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

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

index 50c8ba6..c03c401 100644 (file)
@@ -1,3 +1,13 @@
+2019-10-21  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: REGRESSION(r251227): Uncaught Exception: undefined is not an object (evaluating 'agent.enable')
+        https://bugs.webkit.org/show_bug.cgi?id=203208
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Controllers/AppController.js:
+        (WI.AppController.prototype.activateExtraDomains):
+
 2019-10-21  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Provide a flag for technology preview builds
index b0f1250..26ea305 100644 (file)
@@ -72,17 +72,18 @@ WI.AppController = class AppController extends WI.AppControllerBase
         console.assert(WI.sharedApp.debuggableType === WI.DebuggableType.JavaScript);
         console.assert(WI.targets.length === 1);
 
+        let target = WI.mainTarget;
+
         for (let domain of domains) {
-            let agent = InspectorBackend.activateDomain(domain);
+            InspectorBackend.activateDomain(domain);
 
-            for (let target of WI.targets)
-                target.activateExtraDomain(domain);
+            target.activateExtraDomain(domain);
 
             let manager = WI.managers.find((manager) => manager.domains && manager.domains.includes(domain));
             if (manager)
                 manager.activateExtraDomain(domain);
-            else if (agent.enable)
-                agent.enable();
+            else if (target.hasCommand(domain + ".enable"))
+                target._agents[domain].enable();
         }
 
         // FIXME: all code within WI.activateExtraDomains should be distributed elsewhere.