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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js

Issue 2851913002: [DevTools] Do not expose agents on Target
Patch Set: storage and tests.js Created 3 years, 8 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
Index: third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
index c778cd3034c7c59be72a12bdf81d1c23e7fb07b2..6953e7808f8cd26e7229e49ed941d7a692f03f08 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
@@ -34,12 +34,13 @@
SDK.DebuggerModel = class extends SDK.SDKModel {
/**
* @param {!SDK.Target} target
+ * @param {!Protocol.Dispatcher} dispatcher
*/
- constructor(target) {
- super(target);
+ constructor(target, dispatcher) {
+ super(target, dispatcher);
- target.registerDebuggerDispatcher(new SDK.DebuggerDispatcher(this));
- this._agent = target.debuggerAgent();
+ dispatcher.registerDebuggerDispatcher(new SDK.DebuggerDispatcher(this));
+ this._agent = dispatcher.debuggerAgent();
this._runtimeModel = /** @type {!SDK.RuntimeModel} */ (target.model(SDK.RuntimeModel));
/** @type {!SDK.SourceMapManager<!SDK.Script>} */
@@ -510,7 +511,7 @@ SDK.DebuggerModel = class extends SDK.SDKModel {
sourceURL = this._internString(sourceURL);
}
var script = new SDK.Script(
- this, scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId,
+ this, this._agent, scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId,
this._internString(hash), isContentScript, isLiveEdit, sourceMapURL, hasSourceURL, length);
this._registerScript(script);
if (!hasSyntaxError)

Powered by Google App Engine
This is Rietveld 408576698