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

Unified Diff: Source/modules/serviceworkers/WaitUntilObserver.cpp

Issue 352423005: Add ServiceWorker InstallPhaseEvent.waitUntil() layout test. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review update Created 6 years, 6 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: Source/modules/serviceworkers/WaitUntilObserver.cpp
diff --git a/Source/modules/serviceworkers/WaitUntilObserver.cpp b/Source/modules/serviceworkers/WaitUntilObserver.cpp
index 67770666e830b8fc7b85687c6252709008b51bab..bfee27809c03a3fc480d4287504c45e2eef8d133 100644
--- a/Source/modules/serviceworkers/WaitUntilObserver.cpp
+++ b/Source/modules/serviceworkers/WaitUntilObserver.cpp
@@ -108,7 +108,7 @@ void WaitUntilObserver::incrementPendingActivity()
void WaitUntilObserver::decrementPendingActivity()
{
ASSERT(m_pendingActivity > 0);
- if (--m_pendingActivity || !executionContext())
+ if (!executionContext() || (!m_hasError && --m_pendingActivity))
jsbell 2014/07/01 16:16:48 Is the assertion in the destructor still valid if
xiang 2014/07/02 05:10:43 I will remove assertion in desctructor as it's not
return;
ServiceWorkerGlobalScopeClient* client = ServiceWorkerGlobalScopeClient::from(executionContext());

Powered by Google App Engine
This is Rietveld 408576698