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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/HeapProfilerModel.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/HeapProfilerModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/HeapProfilerModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/HeapProfilerModel.js
index 99849477b28d17a5efb0a40473b882d00a39873c..0eb6106836bda5eef3b032bf20f0f6099dafc1df 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/HeapProfilerModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/HeapProfilerModel.js
@@ -4,12 +4,13 @@
SDK.HeapProfilerModel = class extends SDK.SDKModel {
/**
* @param {!SDK.Target} target
+ * @param {!Protocol.Dispatcher} dispatcher
*/
- constructor(target) {
- super(target);
- target.registerHeapProfilerDispatcher(new SDK.HeapProfilerDispatcher(this));
+ constructor(target, dispatcher) {
+ super(target, dispatcher);
+ dispatcher.registerHeapProfilerDispatcher(new SDK.HeapProfilerDispatcher(this));
this._enabled = false;
- this._heapProfilerAgent = target.heapProfilerAgent();
+ this._heapProfilerAgent = dispatcher.heapProfilerAgent();
this._runtimeModel = /** @type {!SDK.RuntimeModel} */ (target.model(SDK.RuntimeModel));
}

Powered by Google App Engine
This is Rietveld 408576698