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

Unified Diff: Source/devtools/front_end/sdk/ServiceWorkerManager.js

Issue 1318043003: DevTools: attempt to unflake http/tests/inspector/service-workers/service-workers-view.html. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | « Source/devtools/front_end/bindings/NetworkProject.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/ServiceWorkerManager.js
diff --git a/Source/devtools/front_end/sdk/ServiceWorkerManager.js b/Source/devtools/front_end/sdk/ServiceWorkerManager.js
index 1436c99e32ace83b89e5f2b0a17d0d92cfe4beb9..ffdbb97914f635df3970a0bdd4825a33f1631b7c 100644
--- a/Source/devtools/front_end/sdk/ServiceWorkerManager.js
+++ b/Source/devtools/front_end/sdk/ServiceWorkerManager.js
@@ -376,10 +376,11 @@ WebInspector.ServiceWorker = function(manager, workerId, url)
*/
function targetCreated(target)
{
- if (!target) {
+ if (!this._connection || !target) {
this._manager._workers.delete(workerId);
return;
}
+ this._target = target;
this._manager.dispatchEventToListeners(WebInspector.ServiceWorkerManager.Events.WorkersUpdated);
target.runtimeAgent().run();
}
@@ -419,7 +420,10 @@ WebInspector.ServiceWorker.prototype = {
_closeConnection: function()
{
+ if (!this._target)
dgozman 2015/08/28 00:23:53 Why this check? Should close connection anyway.
pfeldman 2015/08/28 17:17:23 If the target is missing, it means connection did
+ return;
this._connection._close();
+ delete this._connection;
}
}
« no previous file with comments | « Source/devtools/front_end/bindings/NetworkProject.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698