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

Unified Diff: content/worker/websharedworker_stub.cc

Issue 171943002: Don't terminate SharedWorker while loading the script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move the position of "impl_->terminateWorkerContext();". Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/worker/websharedworker_stub.cc
diff --git a/content/worker/websharedworker_stub.cc b/content/worker/websharedworker_stub.cc
index a2471df4a04783b8213ad403983d47297ce583fa..2737f6c422786f1ac3e74526ec7b8f9f2e490e5a 100644
--- a/content/worker/websharedworker_stub.cc
+++ b/content/worker/websharedworker_stub.cc
@@ -102,11 +102,11 @@ void WebSharedWorkerStub::OnConnect(int sent_message_port_id, int routing_id) {
}
void WebSharedWorkerStub::OnTerminateWorkerContext() {
- impl_->terminateWorkerContext();
-
+ running_ = false;
// Call the client to make sure context exits.
EnsureWorkerContextTerminates();
- running_ = false;
+ // This may call "delete this" via WorkerScriptLoadFailed and Shutdown.
+ impl_->terminateWorkerContext();
}
void WebSharedWorkerStub::WorkerScriptLoaded() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698