| Index: third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
|
| index b0e1dbc5bf881f93960942b6dcf5350fe2262a76..ec002ede92e0d8f87b3ff031b809526bf828323a 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
|
| @@ -34,12 +34,13 @@
|
| SDK.RuntimeModel = class extends SDK.SDKModel {
|
| /**
|
| * @param {!SDK.Target} target
|
| + * @param {!Protocol.Dispatcher} dispatcher
|
| */
|
| - constructor(target) {
|
| - super(target);
|
| + constructor(target, dispatcher) {
|
| + super(target, dispatcher);
|
|
|
| - this._agent = target.runtimeAgent();
|
| - this.target().registerRuntimeDispatcher(new SDK.RuntimeDispatcher(this));
|
| + this._agent = dispatcher.runtimeAgent();
|
| + dispatcher.registerRuntimeDispatcher(new SDK.RuntimeDispatcher(this));
|
| this._agent.enable();
|
| /** @type {!Map<number, !SDK.ExecutionContext>} */
|
| this._executionContextById = new Map();
|
| @@ -170,7 +171,7 @@ SDK.RuntimeModel = class extends SDK.SDKModel {
|
| createRemoteObject(payload) {
|
| console.assert(typeof payload === 'object', 'Remote object payload should only be an object');
|
| return new SDK.RemoteObjectImpl(
|
| - this, payload.objectId, payload.type, payload.subtype, payload.value, payload.unserializableValue,
|
| + this, this._agent, payload.objectId, payload.type, payload.subtype, payload.value, payload.unserializableValue,
|
| payload.description, payload.preview, payload.customPreview);
|
| }
|
|
|
| @@ -181,8 +182,8 @@ SDK.RuntimeModel = class extends SDK.SDKModel {
|
| */
|
| createScopeRemoteObject(payload, scopeRef) {
|
| return new SDK.ScopeRemoteObject(
|
| - this, payload.objectId, scopeRef, payload.type, payload.subtype, payload.value, payload.unserializableValue,
|
| - payload.description, payload.preview);
|
| + this, this._agent, payload.objectId, scopeRef, payload.type, payload.subtype, payload.value,
|
| + payload.unserializableValue, payload.description, payload.preview);
|
| }
|
|
|
| /**
|
| @@ -205,7 +206,7 @@ SDK.RuntimeModel = class extends SDK.SDKModel {
|
| if (typeof unserializableValue !== 'undefined')
|
| value = undefined;
|
| }
|
| - return new SDK.RemoteObjectImpl(this, undefined, type, undefined, value, unserializableValue);
|
| + return new SDK.RemoteObjectImpl(this, this._agent, undefined, type, undefined, value, unserializableValue);
|
| }
|
|
|
| /**
|
|
|