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

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

Issue 2025143003: [Fetch API] Request's JS wrapper should be kept alive in FetchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.idl ('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 354f27d25e2142a87a171ba2a337d6b6a979d7c4..e998bb03a9a984f99ee6280e306dffb18078bcf8 100644
--- a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -141,7 +141,7 @@ void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID, const WebSer
eventInit.setRequest(request);
eventInit.setClientId(webRequest.isMainResourceLoad() ? WebString() : webRequest.clientId());
eventInit.setIsReload(webRequest.isReload());
- FetchEvent* fetchEvent = FetchEvent::create(EventTypeNames::fetch, eventInit, observer);
+ FetchEvent* fetchEvent = FetchEvent::create(workerGlobalScope()->scriptController()->getScriptState(), EventTypeNames::fetch, eventInit, observer);
DispatchEventResult dispatchResult = workerGlobalScope()->dispatchEvent(fetchEvent);
observer->didDispatchEvent(dispatchResult);
}
@@ -156,7 +156,7 @@ void ServiceWorkerGlobalScopeProxy::dispatchForeignFetchEvent(int eventID, const
eventInit.setCancelable(true);
eventInit.setRequest(request);
eventInit.setOrigin(origin->toString());
- ForeignFetchEvent* fetchEvent = ForeignFetchEvent::create(EventTypeNames::foreignfetch, eventInit, observer);
+ ForeignFetchEvent* fetchEvent = ForeignFetchEvent::create(workerGlobalScope()->scriptController()->getScriptState(), EventTypeNames::foreignfetch, eventInit, observer);
DispatchEventResult dispatchResult = workerGlobalScope()->dispatchEvent(fetchEvent);
observer->didDispatchEvent(dispatchResult);
}
« no previous file with comments | « third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698