| Index: Source/devtools/front_end/sdk/Target.js
|
| diff --git a/Source/devtools/front_end/sdk/Target.js b/Source/devtools/front_end/sdk/Target.js
|
| index dc5ffba3f2747094417a59087b0c09755a1e0736..ccdf45d0c0f6260c2599b053b944413268068742 100644
|
| --- a/Source/devtools/front_end/sdk/Target.js
|
| +++ b/Source/devtools/front_end/sdk/Target.js
|
| @@ -14,6 +14,8 @@
|
| WebInspector.Target = function(name, connection, callback)
|
| {
|
| Protocol.Agents.call(this, connection.agentsMap());
|
| + /** @type {!WeakReference.<!WebInspector.Target>} */
|
| + this._weakReference = new WeakReference(this);
|
| this._name = name;
|
| this._connection = connection;
|
| /** @type {boolean} */
|
| @@ -58,6 +60,14 @@ WebInspector.Target.prototype = {
|
| },
|
|
|
| /**
|
| + * @return {!WeakReference.<!WebInspector.Target>}
|
| + */
|
| + weakReference: function()
|
| + {
|
| + return this._weakReference;
|
| + },
|
| +
|
| + /**
|
| * @param {string} name
|
| * @param {function()|null} callback
|
| * @param {?Protocol.Error} error
|
| @@ -182,6 +192,7 @@ WebInspector.Target.prototype = {
|
|
|
| dispose: function()
|
| {
|
| + this._weakReference.clear();
|
| this.debuggerModel.dispose();
|
| this.networkManager.dispose();
|
| this.cpuProfilerModel.dispose();
|
|
|