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

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 2 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..45e7dfdd8bdd0a4220e71a18278cf3bd8ad4bd42 100644
--- a/Source/modules/serviceworkers/WaitUntilObserver.cpp
+++ b/Source/modules/serviceworkers/WaitUntilObserver.cpp
@@ -62,7 +62,6 @@ PassRefPtr<WaitUntilObserver> WaitUntilObserver::create(ExecutionContext* contex
WaitUntilObserver::~WaitUntilObserver()
{
- ASSERT(!m_pendingActivity);
}
void WaitUntilObserver::willDispatchEvent()
@@ -108,7 +107,7 @@ void WaitUntilObserver::incrementPendingActivity()
void WaitUntilObserver::decrementPendingActivity()
{
ASSERT(m_pendingActivity > 0);
- if (--m_pendingActivity || !executionContext())
+ if (!executionContext() || (!m_hasError && --m_pendingActivity))
return;
ServiceWorkerGlobalScopeClient* client = ServiceWorkerGlobalScopeClient::from(executionContext());

Powered by Google App Engine
This is Rietveld 408576698