Title: [289236] trunk
Revision
289236
Author
[email protected]
Date
2022-02-07 11:57:43 -0800 (Mon, 07 Feb 2022)

Log Message

WorkerGlobalScope.importScripts() should protect blob urls that were passed in until the imports are done
https://bugs.webkit.org/show_bug.cgi?id=236168

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/blob-url.worker-expected.txt:

Source/WebCore:

No new tests, rebaselined existing test.

* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::importScripts):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (289235 => 289236)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-07 19:42:44 UTC (rev 289235)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-07 19:57:43 UTC (rev 289236)
@@ -1,3 +1,14 @@
+2022-02-07  Chris Dumez  <[email protected]>
+
+        WorkerGlobalScope.importScripts() should protect blob urls that were passed in until the imports are done
+        https://bugs.webkit.org/show_bug.cgi?id=236168
+
+        Reviewed by Darin Adler.
+
+        Rebaseline WPT test that is now passing.
+
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/blob-url.worker-expected.txt:
+
 2022-02-07  Antoine Quint  <[email protected]>
 
         [css-logical] css/css-logical/animation-003.tentative is no longer a failure

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/blob-url.worker-expected.txt (289235 => 289236)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/blob-url.worker-expected.txt	2022-02-07 19:42:44 UTC (rev 289235)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/blob-url.worker-expected.txt	2022-02-07 19:57:43 UTC (rev 289236)
@@ -1,5 +1,5 @@
 
 PASS Blob URLs work on importScripts
 PASS A revoked blob URL will fail
-FAIL Revoking a blob URL in an earlier script will not fail Load failed
+PASS Revoking a blob URL in an earlier script will not fail
 

Modified: trunk/Source/WebCore/ChangeLog (289235 => 289236)


--- trunk/Source/WebCore/ChangeLog	2022-02-07 19:42:44 UTC (rev 289235)
+++ trunk/Source/WebCore/ChangeLog	2022-02-07 19:57:43 UTC (rev 289236)
@@ -1,3 +1,15 @@
+2022-02-07  Chris Dumez  <[email protected]>
+
+        WorkerGlobalScope.importScripts() should protect blob urls that were passed in until the imports are done
+        https://bugs.webkit.org/show_bug.cgi?id=236168
+
+        Reviewed by Darin Adler.
+
+        No new tests, rebaselined existing test.
+
+        * workers/WorkerGlobalScope.cpp:
+        (WebCore::WorkerGlobalScope::importScripts):
+
 2022-02-07  Antoine Quint  <[email protected]>
 
         Move DocumentTimeline::runningAnimationsForRendererAreAllAccelerated() to Styleable

Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (289235 => 289236)


--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp	2022-02-07 19:42:44 UTC (rev 289235)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp	2022-02-07 19:57:43 UTC (rev 289236)
@@ -28,6 +28,7 @@
 #include "config.h"
 #include "WorkerGlobalScope.h"
 
+#include "BlobURL.h"
 #include "CSSFontSelector.h"
 #include "CSSValueList.h"
 #include "CSSValuePool.h"
@@ -348,11 +349,14 @@
         return Exception { TypeError, "importScripts cannot be used if worker type is \"module\""_s };
 
     Vector<URL> completedURLs;
+    Vector<BlobURLHandle> protectedBlobURLs;
     completedURLs.reserveInitialCapacity(urls.size());
     for (auto& entry : urls) {
         URL url = ""
         if (!url.isValid())
             return Exception { SyntaxError };
+        if (url.protocolIsBlob())
+            protectedBlobURLs.append(BlobURLHandle { url });
         completedURLs.uncheckedAppend(WTFMove(url));
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to