Index: Source/web/ServiceWorkerGlobalScopeProxy.cpp |
diff --git a/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/Source/web/ServiceWorkerGlobalScopeProxy.cpp |
index fb6044a0ddf2b5a8f8fd18548974489f6ab04c8a..233c8a81c0d7d93578524b0f68163489b2308db1 100644 |
--- a/Source/web/ServiceWorkerGlobalScopeProxy.cpp |
+++ b/Source/web/ServiceWorkerGlobalScopeProxy.cpp |
@@ -101,8 +101,10 @@ void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID, const WebSer |
Request* request = Request::create(m_workerGlobalScope, webRequest); |
request->headers()->setGuard(Headers::ImmutableGuard); |
- RefPtrWillBeRawPtr<FetchEvent> fetchEvent(FetchEvent::create(observer, request)); |
- fetchEvent->setIsReload(webRequest.isReload()); |
+ FetchEventInit eventInit; |
+ eventInit.setRequest(request); |
+ eventInit.setIsReload(webRequest.isReload()); |
+ RefPtrWillBeRawPtr<FetchEvent> fetchEvent(FetchEvent::create(EventTypeNames::fetch, eventInit, observer)); |
defaultPrevented = !m_workerGlobalScope->dispatchEvent(fetchEvent.release()); |
observer->didDispatchEvent(defaultPrevented); |
} |