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

Unified Diff: content/browser/service_worker/embedded_worker_test_helper.cc

Issue 282263008: Retry: Stop ServiceWorker context when no controllee is associated (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: leak fix Created 6 years, 7 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: content/browser/service_worker/embedded_worker_test_helper.cc
diff --git a/content/browser/service_worker/embedded_worker_test_helper.cc b/content/browser/service_worker/embedded_worker_test_helper.cc
index 3d8790f6a531d159e08bbc6a6e1702fb6587a9d0..c43808b28b5da72a8b71fd5439ee04d544623a99 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.cc
+++ b/content/browser/service_worker/embedded_worker_test_helper.cc
@@ -154,8 +154,8 @@ void EmbeddedWorkerTestHelper::SimulateWorkerStarted(
void EmbeddedWorkerTestHelper::SimulateWorkerStopped(
int embedded_worker_id) {
EmbeddedWorkerInstance* worker = registry()->GetWorker(embedded_worker_id);
- ASSERT_TRUE(worker != NULL);
- registry()->OnWorkerStopped(worker->process_id(), embedded_worker_id);
+ if (worker != NULL)
+ registry()->OnWorkerStopped(worker->process_id(), embedded_worker_id);
}
void EmbeddedWorkerTestHelper::SimulateSend(

Powered by Google App Engine
This is Rietveld 408576698