Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Unified Diff: Source/devtools/front_end/Target.js

Issue 201123007: DevTools: Create target per each worker behind experiment (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/Main.js ('k') | Source/devtools/front_end/WorkerManager.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/Target.js
diff --git a/Source/devtools/front_end/Target.js b/Source/devtools/front_end/Target.js
index db1fad43884546cb7c9e57b6621eed6aac89e991..1927c0ba4eb07b6b8bda7edf7bd507df5f0c2582 100644
--- a/Source/devtools/front_end/Target.js
+++ b/Source/devtools/front_end/Target.js
@@ -25,7 +25,8 @@ WebInspector.Target.prototype = {
_initializeCapability: function(name, callback, error, result)
{
this[name] = result;
- Capabilities[name] = result;
+ if (!Capabilities[name])
+ Capabilities[name] = result;
if (callback)
callback();
},
@@ -37,21 +38,33 @@ WebInspector.Target.prototype = {
{
this.consoleModel = new WebInspector.ConsoleModel(this);
//This and similar lines are needed for compatibility
- WebInspector.console = this.consoleModel;
+ if (!WebInspector.console)
+ WebInspector.console = this.consoleModel;
+
this.networkManager = new WebInspector.NetworkManager(this);
- WebInspector.networkManager = this.networkManager;
+ if (!WebInspector.networkManager)
+ WebInspector.networkManager = this.networkManager;
+
this.resourceTreeModel = new WebInspector.ResourceTreeModel(this);
- WebInspector.resourceTreeModel = this.resourceTreeModel;
+ if (!WebInspector.resourceTreeModel)
+ WebInspector.resourceTreeModel = this.resourceTreeModel;
+
this.debuggerModel = new WebInspector.DebuggerModel(this);
- WebInspector.debuggerModel = this.debuggerModel;
+ if (!WebInspector.debuggerModel)
+ WebInspector.debuggerModel = this.debuggerModel;
+
this.runtimeModel = new WebInspector.RuntimeModel(this);
- WebInspector.runtimeModel = this.runtimeModel;
+ if (!WebInspector.runtimeModel)
+ WebInspector.runtimeModel = this.runtimeModel;
//we can't name it domAgent, because it clashes with function, WebInspector.DOMAgent should be renamed to DOMModel
this.domModel = new WebInspector.DOMAgent();
- WebInspector.domAgent = this.domModel;
+ if (!WebInspector.domAgent)
+ WebInspector.domAgent = this.domModel;
+
this.workerManager = new WebInspector.WorkerManager(this.isMainFrontend);
- WebInspector.workerManager = this.workerManager;
+ if (!WebInspector.workerManager)
+ WebInspector.workerManager = this.workerManager;
if (callback)
callback(this);
« no previous file with comments | « Source/devtools/front_end/Main.js ('k') | Source/devtools/front_end/WorkerManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698