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

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

Issue 2736763002: [DevTools] Save connected worker ids to send "detached" notification on restore. (Closed)
Patch Set: test result Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js b/third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js
index 52f19551b75146bdc8f0109192b8b2b61363ea3a..0f1ae0d7de7bab7fcce11b0ecd57a4c3963807bc 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js
@@ -476,12 +476,6 @@ SDK.ChildTargetManager = class {
this._targetAgent.setRemoteLocations([{host: 'localhost', port: 9229}]);
this._targetAgent.setDiscoverTargets(true);
}
-
- this._eventListeners = [];
- if (resourceTreeModel) {
- this._eventListeners.push(resourceTreeModel.addEventListener(
- SDK.ResourceTreeModel.Events.MainFrameNavigated, this._detachWorkersOnMainFrameNavigated, this));
- }
}
suspend() {
@@ -499,7 +493,6 @@ SDK.ChildTargetManager = class {
}
dispose() {
- Common.EventTarget.removeEventListeners(this._eventListeners);
// TODO(dgozman): this is O(n^2) when removing main target.
var childTargets = this._targetManager._targets.filter(child => child.parentTarget() === this._parentTarget);
for (var child of childTargets)
@@ -525,16 +518,6 @@ SDK.ChildTargetManager = class {
return 0;
}
- _detachWorkersOnMainFrameNavigated() {
- // TODO(dgozman): send these from backend.
- var idsToDetach = [];
- for (var target of this._targetManager._targets) {
- if (target.parentTarget() === this._parentTarget && target[SDK.TargetManager._isWorkerSymbol])
- idsToDetach.push(target.id());
- }
- idsToDetach.forEach(id => this.detachedFromTarget(id));
- }
-
/**
* @override
* @param {!Protocol.Target.TargetInfo} targetInfo
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698