ServiceWorker Inspector: Uncaught Exception: null is not an object (evaluating 'resou...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2018 07:32:45 +0000 (07:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2018 07:32:45 +0000 (07:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191339

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-11-06
Reviewed by Matt Baker.

* workers/service/ServiceWorkerJob.cpp:
(WebCore::ServiceWorkerJob::fetchScriptWithContext):
Use the Service Worker's identifier, not this static but otherwise unknown identifier.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237917 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/workers/service/ServiceWorkerJob.cpp

index 0ef2af5..82cf113 100644 (file)
@@ -1,3 +1,14 @@
+2018-11-06  Joseph Pecoraro  <pecoraro@apple.com>
+
+        ServiceWorker Inspector: Uncaught Exception: null is not an object (evaluating 'resource.target.addResource')
+        https://bugs.webkit.org/show_bug.cgi?id=191339
+
+        Reviewed by Matt Baker.
+
+        * workers/service/ServiceWorkerJob.cpp:
+        (WebCore::ServiceWorkerJob::fetchScriptWithContext):
+        Use the Service Worker's identifier, not this static but otherwise unknown identifier.
+
 2018-11-06  Youenn Fablet  <youenn@apple.com>
 
         sender.replaceTrack() fails with InvalidStateError if the transceiver.direction is "inactive"
index 6d244a0..488b857 100644 (file)
@@ -95,7 +95,7 @@ void ServiceWorkerJob::fetchScriptWithContext(ScriptExecutionContext& context, F
     m_scriptLoader = WorkerScriptLoader::create();
 
     ResourceRequest request { m_jobData.scriptURL };
-    request.setInitiatorIdentifier("serviceWorkerScriptLoad:");
+    request.setInitiatorIdentifier(context.resourceRequestIdentifier());
     request.addHTTPHeaderField("Service-Worker"_s, "script"_s);
 
     FetchOptions options;