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

Unified Diff: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 2645493002: Increase the lifetime of Navigation Preload related objects. (Closed)
Patch Set: fix broken-chunked-encoding-worker.js Created 3 years, 11 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 | « third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/chunked-encoding-worker.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
diff --git a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
index bba0ca85d09187ee22f5e9030b2e5153b64a80c5..0189baf843216e5c561f40f207c0cc740a7debcc 100644
--- a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -212,7 +212,9 @@ void ServiceWorkerGlobalScopeProxy::onNavigationPreloadError(
int fetchEventID,
std::unique_ptr<WebServiceWorkerError> error) {
FetchEvent* fetchEvent = m_pendingPreloadFetchEvents.take(fetchEventID);
- DCHECK(fetchEvent);
+ // This method may be called after onNavigationPreloadResponse() was called.
+ if (!fetchEvent)
+ return;
fetchEvent->onNavigationPreloadError(
workerGlobalScope()->scriptController()->getScriptState(),
std::move(error));
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/chunked-encoding-worker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698