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

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: add FIXME 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
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorker.cpp ('k') | public/platform/WebServiceWorkerState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/WaitUntilObserver.cpp
diff --git a/Source/modules/serviceworkers/WaitUntilObserver.cpp b/Source/modules/serviceworkers/WaitUntilObserver.cpp
index 357254d68a6b6036a177f0ad696043366d7b7233..dbdd3a3aa42713e089740d50678594e326862830 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());
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorker.cpp ('k') | public/platform/WebServiceWorkerState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698