Changeset 289236 in webkit


Ignore:
Timestamp:
Feb 7, 2022 11:57:43 AM (5 months ago)
Author:
Chris Dumez
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):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r289234 r289236  
     12022-02-07  Chris Dumez  <cdumez@apple.com>
     2
     3        WorkerGlobalScope.importScripts() should protect blob urls that were passed in until the imports are done
     4        https://bugs.webkit.org/show_bug.cgi?id=236168
     5
     6        Reviewed by Darin Adler.
     7
     8        Rebaseline WPT test that is now passing.
     9
     10        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/blob-url.worker-expected.txt:
     11
    1122022-02-07  Antoine Quint  <graouts@webkit.org>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/blob-url.worker-expected.txt

    r289116 r289236  
    22PASS Blob URLs work on importScripts
    33PASS A revoked blob URL will fail
    4 FAIL Revoking a blob URL in an earlier script will not fail Load failed
     4PASS Revoking a blob URL in an earlier script will not fail
    55
  • trunk/Source/WebCore/ChangeLog

    r289227 r289236  
     12022-02-07  Chris Dumez  <cdumez@apple.com>
     2
     3        WorkerGlobalScope.importScripts() should protect blob urls that were passed in until the imports are done
     4        https://bugs.webkit.org/show_bug.cgi?id=236168
     5
     6        Reviewed by Darin Adler.
     7
     8        No new tests, rebaselined existing test.
     9
     10        * workers/WorkerGlobalScope.cpp:
     11        (WebCore::WorkerGlobalScope::importScripts):
     12
    1132022-02-07  Antoine Quint  <graouts@webkit.org>
    214
  • trunk/Source/WebCore/workers/WorkerGlobalScope.cpp

    r287303 r289236  
    2929#include "WorkerGlobalScope.h"
    3030
     31#include "BlobURL.h"
    3132#include "CSSFontSelector.h"
    3233#include "CSSValueList.h"
     
    349350
    350351    Vector<URL> completedURLs;
     352    Vector<BlobURLHandle> protectedBlobURLs;
    351353    completedURLs.reserveInitialCapacity(urls.size());
    352354    for (auto& entry : urls) {
     
    354356        if (!url.isValid())
    355357            return Exception { SyntaxError };
     358        if (url.protocolIsBlob())
     359            protectedBlobURLs.append(BlobURLHandle { url });
    356360        completedURLs.uncheckedAppend(WTFMove(url));
    357361    }
Note: See TracChangeset for help on using the changeset viewer.