Changeset 293717 in webkit


Ignore:
Timestamp:
May 2, 2022 11:11:41 PM (3 months ago)
Author:
youenn@apple.com
Message:

URL.createObjectURL should not be exposed in service worker contexts
https://bugs.webkit.org/show_bug.cgi?id=239972

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/service-worker/interface-requirements-sw.https-expected.txt:

Source/WebCore:

Covered by rebased test.

  • bindings/scripts/CodeGeneratorJS.pm:

Add support for DedicatedWorker and SharedWorker in binding generator for function scope expsure.
(GenerateRuntimeEnableConditionalStringForExposeScope):

  • html/DOMURL.idl:

Update WebIDL as per spec.

Location:
trunk
Files:
5 edited

Legend:

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

    r293691 r293717  
     12022-05-02  Youenn Fablet  <youenn@apple.com>
     2
     3        URL.createObjectURL should not be exposed in service worker contexts
     4        https://bugs.webkit.org/show_bug.cgi?id=239972
     5
     6        Reviewed by Chris Dumez.
     7
     8        * web-platform-tests/service-workers/service-worker/interface-requirements-sw.https-expected.txt:
     9
    1102022-05-02  Alex Christensen  <achristensen@webkit.org>
    211
  • trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/interface-requirements-sw.https-expected.txt

    r267647 r293717  
    33PASS Event constructors
    44PASS xhr is not exposed
    5 FAIL URL.createObjectURL is not exposed assert_false: expected false got true
     5PASS URL.createObjectURL is not exposed
    66
  • trunk/Source/WebCore/ChangeLog

    r293700 r293717  
     12022-05-02  Youenn Fablet  <youenn@apple.com>
     2
     3        URL.createObjectURL should not be exposed in service worker contexts
     4        https://bugs.webkit.org/show_bug.cgi?id=239972
     5
     6        Reviewed by Chris Dumez.
     7
     8        Covered by rebased test.
     9
     10        * bindings/scripts/CodeGeneratorJS.pm:
     11        Add support for DedicatedWorker and SharedWorker in binding generator for function scope expsure.
     12        (GenerateRuntimeEnableConditionalStringForExposeScope):
     13        * html/DOMURL.idl:
     14        Update WebIDL as per spec.
     15
    1162022-05-02  Alan Bujtas  <zalan@apple.com>
    217
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r293656 r293717  
    40064006    } elsif ($exposed eq "Worker") {
    40074007      $wrapperType = "JSWorkerGlobalScopeBase";
     4008    } elsif ($exposed eq "DedicatedWorker") {
     4009      $wrapperType = "JSDedicatedWorkerGlobalScope";
     4010    } elsif ($exposed eq "SharedWorker") {
     4011      $wrapperType = "JSSharedWorkerGlobalScope";
    40084012    } elsif ($exposed eq "ShadowRealm") {
    40094013      $wrapperType = "JSShadowRealmGlobalScopeBase";
  • trunk/Source/WebCore/html/DOMURL.idl

    r291295 r293717  
    5252
    5353    // https://w3c.github.io/FileAPI/#creating-revoking.
    54     [CallWith=CurrentScriptExecutionContext] static DOMString createObjectURL(Blob blob);
    55     [CallWith=CurrentScriptExecutionContext] static undefined revokeObjectURL(DOMString url);
     54    [CallWith=CurrentScriptExecutionContext, Exposed=(Window,DedicatedWorker,SharedWorker)] static DOMString createObjectURL(Blob blob);
     55    [CallWith=CurrentScriptExecutionContext, Exposed=(Window,DedicatedWorker,SharedWorker)] static undefined revokeObjectURL(DOMString url);
    5656};
Note: See TracChangeset for help on using the changeset viewer.