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

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

Issue 2421913003: DevTools: allow reattaching main target live. (Closed)
Patch Set: link fixed Created 4 years, 2 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/SubTargetsManager.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/SubTargetsManager.js b/third_party/WebKit/Source/devtools/front_end/sdk/SubTargetsManager.js
index 69f79f9899b7997a23425ed4f8885c2fb217ba63..103613eefafb25ee818a99c12dfbc38b3f4d537f 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/SubTargetsManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/SubTargetsManager.js
@@ -65,7 +65,7 @@ WebInspector.SubTargetsManager.prototype = {
dispose: function()
{
for (var connection of this._connections.values())
- connection._close();
+ connection.close();
this._connections.clear();
this._attachedTargets.clear();
},
@@ -194,7 +194,7 @@ WebInspector.SubTargetsManager.prototype = {
{
var connection = this._connections.get(targetId);
if (connection)
- connection._close();
+ connection._reportClosed();
this._connections.delete(targetId);
var target = this._attachedTargets.get(targetId);
this._attachedTargets.delete(targetId);
@@ -297,7 +297,15 @@ WebInspector.SubTargetConnection.prototype = {
this._agent.sendMessageToTarget(this._targetId, JSON.stringify(messageObject));
},
- _close: function()
+ /**
+ * @override
+ */
+ forceClose: function()
+ {
+ this._agent.detachFromTarget(this._targetId);
+ },
+
+ _reportClosed: function()
{
this.connectionClosed("target_terminated");
},

Powered by Google App Engine
This is Rietveld 408576698