Changeset 152100 in webkit


Ignore:
Timestamp:
Jun 27, 2013 8:46:35 AM (11 years ago)
Author:
Christophe Dumez
Message:

Remove [NoInterfaceObject] from WorkerGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=118071

Reviewed by Kentaro Hara.

.:

Update GENERATE_BINDINGS CMake macro to take 2 additional parameters
now needed by the preprocess-idls.pl script.

  • Source/cmake/WebKitMacros.cmake:

Source/WebCore:

Expose WorkerGlobalScope interface in worker environment as per the latest
specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface

Also expose the SharedWorkerGlobalScope interface when the JavaScript global environment is a
shared worker environment, and the DedicatedWorkerGlobalScope interface when the JavaScript
global environment is a dedicated worker environment:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#sharedworkerglobalscope
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#dedicatedworkerglobalscope

The semantics of the [GlobalContext] IDL extended attribute has changed to support this
use case. The value for the extended attribute is now the name of the interface to which the
Constructor attribute should be added (Window, WorkerGlobalScope, SharedWorkerGlobalScope...).
It is possible to specify several interface names by using '&' as separator. For e.g.
[GlobalContext=DOMWindow&WorkerGlobalScope].

Tests: fast/js/global-constructors-attributes-dedicated-worker.html

fast/js/global-constructors-attributes-shared-worker.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • DerivedSources.pri:
  • GNUmakefile.am:
  • Modules/websockets/WebSocket.idl:
  • UseJSC.cmake:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateConstructorHelperMethods):

  • bindings/scripts/IDLAttributes.txt:
  • bindings/scripts/generate-bindings.pl:

(checkIfIDLAttributesExists):

  • bindings/scripts/preprocess-idls.pl:
  • dom/MessageChannel.idl:
  • dom/MessageEvent.idl:
  • fileapi/Blob.idl:
  • fileapi/FileReader.idl:
  • fileapi/FileReaderSync.idl:
  • html/DOMURL.idl:
  • html/canvas/ArrayBuffer.idl:
  • html/canvas/DataView.idl:
  • html/canvas/Float32Array.idl:
  • html/canvas/Float64Array.idl:
  • html/canvas/Int16Array.idl:
  • html/canvas/Int32Array.idl:
  • html/canvas/Int8Array.idl:
  • html/canvas/Uint16Array.idl:
  • html/canvas/Uint32Array.idl:
  • html/canvas/Uint8Array.idl:
  • html/canvas/Uint8ClampedArray.idl:
  • page/EventSource.idl:
  • workers/DedicatedWorkerGlobalScope.idl:
  • workers/SharedWorkerGlobalScope.idl:
  • workers/WorkerGlobalScope.idl:
  • workers/WorkerLocation.idl:
  • xml/XMLHttpRequest.idl:

Tools:

Update bindings test script to pass 2 additional parameters
now needed by the preprocess-idls.pl script.

  • Scripts/webkitpy/bindings/main.py:

(BindingsTests.generate_supplemental_dependency):
(BindingsTests.main):

LayoutTests:

Split fast/js/global-constructors-attributes-worker.html test into 2 for both
shared and dedicated workers, as the output is now different.

  • fast/js/global-constructors-attributes-dedicated-worker-expected.txt: Copied from LayoutTests/fast/js/global-constructors-attributes-worker-expected.txt.
  • fast/js/global-constructors-attributes-dedicated-worker.html: Copied from LayoutTests/fast/js/global-constructors-attributes-worker.html.
  • fast/js/global-constructors-attributes-shared-worker-expected.txt: Renamed from LayoutTests/fast/js/global-constructors-attributes-worker-expected.txt.
  • fast/js/global-constructors-attributes-shared-worker.html: Renamed from LayoutTests/fast/js/global-constructors-attributes-worker.html.
  • fast/js/script-tests/global-constructors-attributes.js:

(.self.postMessage):
(.self.onconnect.self.postMessage):
(.self.onconnect):

  • platform/efl/fast/js/global-constructors-attributes-dedicated-worker-expected.txt: Copied from LayoutTests/platform/gtk/fast/js/global-constructors-attributes-worker-expected.txt.
  • platform/efl/fast/js/global-constructors-attributes-shared-worker-expected.txt: Copied from LayoutTests/platform/gtk/fast/js/global-constructors-attributes-worker-expected.txt.
  • platform/gtk/fast/js/global-constructors-attributes-dedicated-worker-expected.txt: Renamed from LayoutTests/platform/gtk/fast/js/global-constructors-attributes-worker-expected.txt.
  • platform/gtk/fast/js/global-constructors-attributes-shared-worker-expected.txt: Renamed from LayoutTests/platform/efl/fast/js/global-constructors-attributes-worker-expected.txt.
Location:
trunk
Files:
40 edited
4 copied
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r151905 r152100  
     12013-06-27  Christophe Dumez  <ch.dumez@sisa.samsung.com>
     2
     3        Remove [NoInterfaceObject] from WorkerGlobalScope
     4        https://bugs.webkit.org/show_bug.cgi?id=118071
     5
     6        Reviewed by Kentaro Hara.
     7
     8        Update GENERATE_BINDINGS CMake macro to take 2 additional parameters
     9        now needed by the preprocess-idls.pl script.
     10
     11        * Source/cmake/WebKitMacros.cmake:
     12
    1132013-06-24  Ryuan Choi  <ryuan.choi@samsung.com>
    214
  • trunk/LayoutTests/ChangeLog

    r152097 r152100  
     12013-06-27  Christophe Dumez  <ch.dumez@sisa.samsung.com>
     2
     3        Remove [NoInterfaceObject] from WorkerGlobalScope
     4        https://bugs.webkit.org/show_bug.cgi?id=118071
     5
     6        Reviewed by Kentaro Hara.
     7
     8        Split fast/js/global-constructors-attributes-worker.html test into 2 for both
     9        shared and dedicated workers, as the output is now different.
     10
     11        * fast/js/global-constructors-attributes-dedicated-worker-expected.txt: Copied from LayoutTests/fast/js/global-constructors-attributes-worker-expected.txt.
     12        * fast/js/global-constructors-attributes-dedicated-worker.html: Copied from LayoutTests/fast/js/global-constructors-attributes-worker.html.
     13        * fast/js/global-constructors-attributes-shared-worker-expected.txt: Renamed from LayoutTests/fast/js/global-constructors-attributes-worker-expected.txt.
     14        * fast/js/global-constructors-attributes-shared-worker.html: Renamed from LayoutTests/fast/js/global-constructors-attributes-worker.html.
     15        * fast/js/script-tests/global-constructors-attributes.js:
     16        (.self.postMessage):
     17        (.self.onconnect.self.postMessage):
     18        (.self.onconnect):
     19        * platform/efl/fast/js/global-constructors-attributes-dedicated-worker-expected.txt: Copied from LayoutTests/platform/gtk/fast/js/global-constructors-attributes-worker-expected.txt.
     20        * platform/efl/fast/js/global-constructors-attributes-shared-worker-expected.txt: Copied from LayoutTests/platform/gtk/fast/js/global-constructors-attributes-worker-expected.txt.
     21        * platform/gtk/fast/js/global-constructors-attributes-dedicated-worker-expected.txt: Renamed from LayoutTests/platform/gtk/fast/js/global-constructors-attributes-worker-expected.txt.
     22        * platform/gtk/fast/js/global-constructors-attributes-shared-worker-expected.txt: Renamed from LayoutTests/platform/efl/fast/js/global-constructors-attributes-worker-expected.txt.
     23
    1242013-06-27  Seokju Kwon  <seokju.kwon@gmail.com>
    225
  • trunk/LayoutTests/fast/js/global-constructors-attributes-dedicated-worker-expected.txt

    r152099 r152100  
    1 Test to ensure that global constructors have the right attributes in the worker context
     1Test to ensure that global constructors have the right attributes in the dedicated worker context
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    2020PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').enumerable is false
    2121PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').configurable is true
     22PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').value is DedicatedWorkerGlobalScope
     23PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').hasOwnProperty('get') is false
     24PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').hasOwnProperty('set') is false
     25PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').enumerable is false
     26PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').configurable is true
    2227PASS [Worker] Object.getOwnPropertyDescriptor(global, 'EventSource').value is EventSource
    2328PASS [Worker] Object.getOwnPropertyDescriptor(global, 'EventSource').hasOwnProperty('get') is false
     
    100105PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').enumerable is false
    101106PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').configurable is true
     107PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').value is WorkerGlobalScope
     108PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').hasOwnProperty('get') is false
     109PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').hasOwnProperty('set') is false
     110PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').enumerable is false
     111PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').configurable is true
    102112PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerLocation').value is WorkerLocation
    103113PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerLocation').hasOwnProperty('get') is false
  • trunk/LayoutTests/fast/js/global-constructors-attributes-dedicated-worker.html

    r152099 r152100  
    55<body>
    66<script>
    7 description("Test to ensure that global constructors have the right attributes in the worker context");
     7description("Test to ensure that global constructors have the right attributes in the dedicated worker context");
    88
    9 worker = startWorker("script-tests/global-constructors-attributes.js");
     9worker = startWorker("script-tests/global-constructors-attributes.js", false /* shared */);
    1010</script>
    1111<script src="resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/js/global-constructors-attributes-shared-worker-expected.txt

    r152099 r152100  
    1 Test to ensure that global constructors have the right attributes in the worker context
     1Test to ensure that global constructors have the right attributes in the shared worker context
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    7070PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageEvent').enumerable is false
    7171PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageEvent').configurable is true
     72PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').value is SharedWorkerGlobalScope
     73PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').hasOwnProperty('get') is false
     74PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').hasOwnProperty('set') is false
     75PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').enumerable is false
     76PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').configurable is true
    7277PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').value is URL
    7378PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('get') is false
     
    100105PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').enumerable is false
    101106PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').configurable is true
     107PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').value is WorkerGlobalScope
     108PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').hasOwnProperty('get') is false
     109PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').hasOwnProperty('set') is false
     110PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').enumerable is false
     111PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').configurable is true
    102112PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerLocation').value is WorkerLocation
    103113PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerLocation').hasOwnProperty('get') is false
  • trunk/LayoutTests/fast/js/global-constructors-attributes-shared-worker.html

    r152099 r152100  
    55<body>
    66<script>
    7 description("Test to ensure that global constructors have the right attributes in the worker context");
     7description("Test to ensure that global constructors have the right attributes in the shared worker context");
    88
    9 worker = startWorker("script-tests/global-constructors-attributes.js");
     9worker = startWorker("script-tests/global-constructors-attributes.js", true /* shared */);
    1010</script>
    1111<script src="resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/js/script-tests/global-constructors-attributes.js

    r150664 r152100  
    1 if (this.importScripts)
    2     importScripts('../resources/js-test-pre.js');
     1if (self.importScripts) {
     2     importScripts('../resources/js-test-pre.js');
     3
     4    if (!self.postMessage) {
     5        // Shared worker.  Make postMessage send to the newest client, which in
     6        // our tests is the only client.
     7
     8        // Store messages for sending until we have somewhere to send them.
     9        self.postMessage = function(message) {
     10            if (typeof self.pendingMessages === "undefined")
     11                self.pendingMessages = [];
     12            self.pendingMessages.push(message);
     13        };
     14        self.onconnect = function(event) {
     15            self.postMessage = function(message) {
     16                event.ports[0].postMessage(message);
     17            };
     18            // Offload any stored messages now that someone has connected to us.
     19            if (typeof self.pendingMessages === "undefined")
     20                return;
     21            while (self.pendingMessages.length)
     22                event.ports[0].postMessage(self.pendingMessages.shift());
     23        };
     24    }
     25}
    326
    427function descriptorShouldBe(object, property, expected) {
  • trunk/LayoutTests/platform/efl/fast/js/global-constructors-attributes-dedicated-worker-expected.txt

    r152099 r152100  
    1 Test to ensure that global constructors have the right attributes in the worker context
     1Test to ensure that global constructors have the right attributes in the dedicated worker context
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    2020PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').enumerable is false
    2121PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').configurable is true
     22PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').value is DedicatedWorkerGlobalScope
     23PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').hasOwnProperty('get') is false
     24PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').hasOwnProperty('set') is false
     25PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').enumerable is false
     26PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').configurable is true
    2227PASS [Worker] Object.getOwnPropertyDescriptor(global, 'EventSource').value is EventSource
    2328PASS [Worker] Object.getOwnPropertyDescriptor(global, 'EventSource').hasOwnProperty('get') is false
     
    155160PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').enumerable is false
    156161PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').configurable is true
     162PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').value is WorkerGlobalScope
     163PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').hasOwnProperty('get') is false
     164PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').hasOwnProperty('set') is false
     165PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').enumerable is false
     166PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').configurable is true
    157167PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerLocation').value is WorkerLocation
    158168PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerLocation').hasOwnProperty('get') is false
  • trunk/LayoutTests/platform/efl/fast/js/global-constructors-attributes-shared-worker-expected.txt

    r152099 r152100  
    1 Test to ensure that global constructors have the right attributes in the worker context
     1Test to ensure that global constructors have the right attributes in the shared worker context
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    125125PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageEvent').enumerable is false
    126126PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageEvent').configurable is true
     127PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').value is SharedWorkerGlobalScope
     128PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').hasOwnProperty('get') is false
     129PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').hasOwnProperty('set') is false
     130PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').enumerable is false
     131PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').configurable is true
    127132PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').value is URL
    128133PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('get') is false
     
    155160PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').enumerable is false
    156161PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').configurable is true
     162PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').value is WorkerGlobalScope
     163PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').hasOwnProperty('get') is false
     164PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').hasOwnProperty('set') is false
     165PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').enumerable is false
     166PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').configurable is true
    157167PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerLocation').value is WorkerLocation
    158168PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerLocation').hasOwnProperty('get') is false
  • trunk/LayoutTests/platform/gtk/fast/js/global-constructors-attributes-dedicated-worker-expected.txt

    r152099 r152100  
    1 Test to ensure that global constructors have the right attributes in the worker context
     1Test to ensure that global constructors have the right attributes in the dedicated worker context
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    2020PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').enumerable is false
    2121PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').configurable is true
     22PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').value is DedicatedWorkerGlobalScope
     23PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').hasOwnProperty('get') is false
     24PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').hasOwnProperty('set') is false
     25PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').enumerable is false
     26PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').configurable is true
    2227PASS [Worker] Object.getOwnPropertyDescriptor(global, 'EventSource').value is EventSource
    2328PASS [Worker] Object.getOwnPropertyDescriptor(global, 'EventSource').hasOwnProperty('get') is false
     
    155160PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').enumerable is false
    156161PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').configurable is true
     162PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').value is WorkerGlobalScope
     163PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').hasOwnProperty('get') is false
     164PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').hasOwnProperty('set') is false
     165PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').enumerable is false
     166PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').configurable is true
    157167PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerLocation').value is WorkerLocation
    158168PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerLocation').hasOwnProperty('get') is false
  • trunk/LayoutTests/platform/gtk/fast/js/global-constructors-attributes-shared-worker-expected.txt

    r152099 r152100  
    1 Test to ensure that global constructors have the right attributes in the worker context
     1Test to ensure that global constructors have the right attributes in the shared worker context
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    125125PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageEvent').enumerable is false
    126126PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageEvent').configurable is true
     127PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').value is SharedWorkerGlobalScope
     128PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').hasOwnProperty('get') is false
     129PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').hasOwnProperty('set') is false
     130PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').enumerable is false
     131PASS [Worker] Object.getOwnPropertyDescriptor(global, 'SharedWorkerGlobalScope').configurable is true
    127132PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').value is URL
    128133PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('get') is false
     
    155160PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').enumerable is false
    156161PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').configurable is true
     162PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').value is WorkerGlobalScope
     163PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').hasOwnProperty('get') is false
     164PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').hasOwnProperty('set') is false
     165PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').enumerable is false
     166PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerGlobalScope').configurable is true
    157167PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerLocation').value is WorkerLocation
    158168PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WorkerLocation').hasOwnProperty('get') is false
  • trunk/Source/WebCore/CMakeLists.txt

    r152099 r152100  
    29622962set(WINDOW_CONSTRUCTORS_FILE ${DERIVED_SOURCES_WEBCORE_DIR}/DOMWindowConstructors.idl)
    29632963set(WORKERGLOBALSCOPE_CONSTRUCTORS_FILE ${DERIVED_SOURCES_WEBCORE_DIR}/WorkerGlobalScopeConstructors.idl)
     2964set(SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE ${DERIVED_SOURCES_WEBCORE_DIR}/SharedWorkerGlobalScopeConstructors.idl)
     2965set(DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE ${DERIVED_SOURCES_WEBCORE_DIR}/DedicatedWorkerGlobalScopeConstructors.idl)
    29642966set(IDL_ATTRIBUTES_FILE ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
    29652967
  • trunk/Source/WebCore/ChangeLog

    r152099 r152100  
     12013-06-27  Christophe Dumez  <ch.dumez@sisa.samsung.com>
     2
     3        Remove [NoInterfaceObject] from WorkerGlobalScope
     4        https://bugs.webkit.org/show_bug.cgi?id=118071
     5
     6        Reviewed by Kentaro Hara.
     7
     8        Expose WorkerGlobalScope interface in worker environment as per the latest
     9        specification:
     10        http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
     11
     12        Also expose the SharedWorkerGlobalScope interface when the JavaScript global environment is a
     13        shared worker environment, and the DedicatedWorkerGlobalScope interface when the JavaScript
     14        global environment is a dedicated worker environment:
     15        http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#sharedworkerglobalscope
     16        http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#dedicatedworkerglobalscope
     17
     18        The semantics of the [GlobalContext] IDL extended attribute has changed to support this
     19        use case. The value for the extended attribute is now the name of the interface to which the
     20        Constructor attribute should be added (Window, WorkerGlobalScope, SharedWorkerGlobalScope...).
     21        It is possible to specify several interface names by using '&' as separator. For e.g.
     22        [GlobalContext=DOMWindow&WorkerGlobalScope].
     23
     24        Tests: fast/js/global-constructors-attributes-dedicated-worker.html
     25               fast/js/global-constructors-attributes-shared-worker.html
     26
     27        * CMakeLists.txt:
     28        * DerivedSources.make:
     29        * DerivedSources.pri:
     30        * GNUmakefile.am:
     31        * Modules/websockets/WebSocket.idl:
     32        * UseJSC.cmake:
     33        * bindings/scripts/CodeGeneratorJS.pm:
     34        (GenerateConstructorHelperMethods):
     35        * bindings/scripts/IDLAttributes.txt:
     36        * bindings/scripts/generate-bindings.pl:
     37        (checkIfIDLAttributesExists):
     38        * bindings/scripts/preprocess-idls.pl:
     39        * dom/MessageChannel.idl:
     40        * dom/MessageEvent.idl:
     41        * fileapi/Blob.idl:
     42        * fileapi/FileReader.idl:
     43        * fileapi/FileReaderSync.idl:
     44        * html/DOMURL.idl:
     45        * html/canvas/ArrayBuffer.idl:
     46        * html/canvas/DataView.idl:
     47        * html/canvas/Float32Array.idl:
     48        * html/canvas/Float64Array.idl:
     49        * html/canvas/Int16Array.idl:
     50        * html/canvas/Int32Array.idl:
     51        * html/canvas/Int8Array.idl:
     52        * html/canvas/Uint16Array.idl:
     53        * html/canvas/Uint32Array.idl:
     54        * html/canvas/Uint8Array.idl:
     55        * html/canvas/Uint8ClampedArray.idl:
     56        * page/EventSource.idl:
     57        * workers/DedicatedWorkerGlobalScope.idl:
     58        * workers/SharedWorkerGlobalScope.idl:
     59        * workers/WorkerGlobalScope.idl:
     60        * workers/WorkerLocation.idl:
     61        * xml/XMLHttpRequest.idl:
     62
    1632013-06-27  Commit Queue  <commit-queue@webkit.org>
    264
  • trunk/Source/WebCore/DerivedSources.make

    r152080 r152100  
    10111011WINDOW_CONSTRUCTORS_FILE = ./DOMWindowConstructors.idl
    10121012WORKERGLOBALSCOPE_CONSTRUCTORS_FILE = ./WorkerGlobalScopeConstructors.idl
     1013SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE = ./SharedWorkerGlobalScopeConstructors.idl
     1014DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE = ./DedicatedWorkerGlobalScopeConstructors.idl
    10131015IDL_FILES_TMP = ./idl_files.tmp
    10141016ADDITIONAL_IDLS = $(WebCore)/inspector/JavaScriptCallFrame.idl
     
    10221024$(SUPPLEMENTAL_MAKEFILE_DEPS) : $(PREPROCESS_IDLS_SCRIPTS) $(BINDING_IDLS) $(ADDITIONAL_IDLS) $(PLATFORM_FEATURE_DEFINES)
    10231025        printf "$(subst $(space),,$(patsubst %,%\n,$(BINDING_IDLS) $(ADDITIONAL_IDLS)))" > $(IDL_FILES_TMP)
    1024         $(call preprocess_idls_script, $(PREPROCESS_IDLS_SCRIPTS)) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --idlFilesList $(IDL_FILES_TMP) --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) --windowConstructorsFile $(WINDOW_CONSTRUCTORS_FILE) --workerGlobalScopeConstructorsFile $(WORKERGLOBALSCOPE_CONSTRUCTORS_FILE) --supplementalMakefileDeps $@
     1026        $(call preprocess_idls_script, $(PREPROCESS_IDLS_SCRIPTS)) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --idlFilesList $(IDL_FILES_TMP) --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) --windowConstructorsFile $(WINDOW_CONSTRUCTORS_FILE) --workerGlobalScopeConstructorsFile $(WORKERGLOBALSCOPE_CONSTRUCTORS_FILE) --sharedWorkerGlobalScopeConstructorsFile $(SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE) --dedicatedWorkerGlobalScopeConstructorsFile $(DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE) --supplementalMakefileDeps $@
    10251027        rm -f $(IDL_FILES_TMP)
    10261028
  • trunk/Source/WebCore/DerivedSources.pri

    r152080 r152100  
    736736WINDOW_CONSTRUCTORS_FILE = DOMWindowConstructors.idl
    737737WORKERGLOBALSCOPE_CONSTRUCTORS_FILE = WorkerGlobalScopeConstructors.idl
     738SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE = SharedWorkerGlobalScopeConstructors.idl
     739DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE = DedicatedWorkerGlobalScopeConstructors.idl
    738740IDL_FILES_TMP = ${QMAKE_FUNC_FILE_OUT_PATH}/idl_files.tmp
    739741PREPROCESS_IDLS_SCRIPT = $$PWD/bindings/scripts/preprocess-idls.pl
     
    755757                               --supplementalDependencyFile ${QMAKE_FUNC_FILE_OUT_PATH}/$$SUPPLEMENTAL_DEPENDENCY_FILE \
    756758                               --windowConstructorsFile ${QMAKE_FUNC_FILE_OUT_PATH}/$$WINDOW_CONSTRUCTORS_FILE \
    757                                --workerGlobalScopeConstructorsFile ${QMAKE_FUNC_FILE_OUT_PATH}/$$WORKERGLOBALSCOPE_CONSTRUCTORS_FILE
    758 preprocessIdls.output = $$SUPPLEMENTAL_DEPENDENCY_FILE $$WINDOW_CONSTRUCTORS_FILE $$WORKERGLOBALSCOPE_CONSTRUCTORS_FILE
     759                               --workerGlobalScopeConstructorsFile ${QMAKE_FUNC_FILE_OUT_PATH}/$$WORKERGLOBALSCOPE_CONSTRUCTORS_FILE \
     760                               --sharedWorkerGlobalScopeConstructorsFile ${QMAKE_FUNC_FILE_OUT_PATH}/$$SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE \
     761                               --dedicatedWorkerGlobalScopeConstructorsFile ${QMAKE_FUNC_FILE_OUT_PATH}/$$DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE
     762preprocessIdls.output = $$SUPPLEMENTAL_DEPENDENCY_FILE $$WINDOW_CONSTRUCTORS_FILE $$WORKERGLOBALSCOPE_CONSTRUCTORS_FILE $$SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE $$DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE
    759763preprocessIdls.add_output_to_sources = false
    760764preprocessIdls.depends = $$IDL_BINDINGS
  • trunk/Source/WebCore/GNUmakefile.am

    r152080 r152100  
    406406window_constructors_file = $(top_builddir)/DerivedSources/WebCore/DOMWindowConstructors.idl
    407407workerglobalscope_constructors_file = $(top_builddir)/DerivedSources/WebCore/WorkerGlobalScopeConstructors.idl
     408sharedworkerglobalscope_constructors_file = $(top_builddir)/DerivedSources/WebCore/SharedWorkerGlobalScopeConstructors.idl
     409dedicatedworkerglobalscope_constructors_file = $(top_builddir)/DerivedSources/WebCore/DedicatedWorkerGlobalScopeConstructors.idl
    408410idl_files_list = $(top_builddir)/DerivedSources/WebCore/idl_files_list
    409411idl_attributes_file = $(WebCore)/bindings/scripts/IDLAttributes.txt
     
    414416        $(AM_V_at)echo -n > $(idl_files_list)
    415417        $(AM_V_at)($(foreach idl, $(dom_binding_idls), echo $(idl) &&) echo -n) >> $(idl_files_list)
    416         $(AM_V_at)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/preprocess-idls.pl --defines "LANGUAGE_JAVASCRIPT=1 $(feature_defines)" --idlFilesList $(idl_files_list) --windowConstructorsFile $(window_constructors_file) --workerGlobalScopeConstructorsFile $(workerglobalscope_constructors_file) --supplementalDependencyFile $@
    417 
    418 .PHONY: $(window_constructors_file) $(workerglobalscope_constructors_file)
     418        $(AM_V_at)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/preprocess-idls.pl --defines "LANGUAGE_JAVASCRIPT=1 $(feature_defines)" --idlFilesList $(idl_files_list) --windowConstructorsFile $(window_constructors_file) --workerGlobalScopeConstructorsFile $(workerglobalscope_constructors_file) --sharedWorkerGlobalScopeConstructorsFile $(sharedworkerglobalscope_constructors_file) --dedicatedWorkerGlobalScopeConstructorsFile $(dedicatedworkerglobalscope_constructors_file) --supplementalDependencyFile $@
     419
     420.PHONY: $(window_constructors_file) $(workerglobalscope_constructors_file) $(sharedworkerglobalscope_constructors_file) $(dedicatedworkerglobalscope_constructors_file)
    419421
    420422# This does not appear to work correctly with gnumake unless
     
    436438# which means that GNUmake will only try to build the dependencies first, but
    437439# not rebuild all the targets if the dependencies change.
    438 $(webkitgtk_sources) $(webkit2_sources) $(webkit2_plugin_process_sources) $(webcore_sources) $(webcoregtk_sources) $(platform_sources) $(platformgtk_sources) : | $(supplemental_dependency_file) $(window_constructors_file) $(workerglobalscope_constructors_file) $(webcore_built_sources) $(platform_built_sources)
     440$(webkitgtk_sources) $(webkit2_sources) $(webkit2_plugin_process_sources) $(webcore_sources) $(webcoregtk_sources) $(platform_sources) $(platformgtk_sources) : | $(supplemental_dependency_file) $(window_constructors_file) $(workerglobalscope_constructors_file) $(sharedworkerglobalscope_constructors_file) $(dedictedworkerglobalscope_constructors_file) $(webcore_built_sources) $(platform_built_sources)
    439441
    440442noinst_LTLIBRARIES += \
  • trunk/Source/WebCore/Modules/websockets/WebSocket.idl

    r151495 r152100  
    3131
    3232[
    33     GlobalContext=WindowAndWorker,
     33    GlobalContext=DOMWindow&WorkerGlobalScope,
    3434    EnabledAtRuntime,
    3535    Conditional=WEB_SOCKETS,
  • trunk/Source/WebCore/UseJSC.cmake

    r152080 r152100  
    304304
    305305add_custom_command(
    306     OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE} ${WINDOW_CONSTRUCTORS_FILE} ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
     306    OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE} ${WINDOW_CONSTRUCTORS_FILE} ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE} ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE} ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
    307307    DEPENDS ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl ${SCRIPTS_PREPROCESS_IDLS} ${WebCore_IDL_FILES} ${WebCoreTestSupport_IDL_FILES}
    308308    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl --defines "${FEATURE_DEFINES_JAVASCRIPT}" --idlFilesList ${IDL_FILES_TMP} --supplementalDependencyFile ${SUPPLEMENTAL_DEPENDENCY_FILE} --windowConstructorsFile ${WINDOW_CONSTRUCTORS_FILE} --workerGlobalScopeConstructorsFile ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
     309--sharedWorkerGlobalScopeConstructorsFile ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE} --dedicatedWorkerGlobalScopeConstructorsFile ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
    309310    VERBATIM)
    310311
     
    318319    ${SUPPLEMENTAL_DEPENDENCY_FILE}
    319320    ${WINDOW_CONSTRUCTORS_FILE}
    320     ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE})
     321    ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
     322    ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
     323    ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE})
    321324
    322325GENERATE_BINDINGS(WebCoreTestSupport_SOURCES
     
    329332    ${SUPPLEMENTAL_DEPENDENCY_FILE}
    330333    ${WINDOW_CONSTRUCTORS_FILE}
    331     ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE})
     334    ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
     335    ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
     336    ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE})
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r152080 r152100  
    43054305    push(@$outputArray, "void ${constructorClassName}::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)\n");
    43064306    push(@$outputArray, "{\n");
    4307     if ($interfaceName eq "DOMWindow") {
     4307    if ($interfaceName eq "DOMWindow" || $interface->extendedAttributes->{"IsWorkerGlobalScope"}) {
    43084308        push(@$outputArray, "    Base::finishCreation(exec->vm());\n");
    43094309        push(@$outputArray, "    ASSERT(inherits(&s_info));\n");
  • trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt

    r152080 r152100  
    6161GenerateIsReachable=|Impl|ImplContext|ImplDocument|ImplElementRoot|ImplFrame|ImplOwnerNodeRoot
    6262GetterRaisesException
    63 GlobalContext=WindowOnly|WorkerOnly|WindowAndWorker
     63GlobalContext=DOMWindow|WorkerGlobalScope|SharedWorkerGlobalScope|DedicatedWorkerGlobalScope
    6464Immutable
    6565ImplementationLacksVTable
  • trunk/Source/WebCore/bindings/scripts/generate-bindings.pl

    r151771 r152100  
    286286            next;
    287287        }
    288         for my $rightValue (split /\s*\|\s*/, $extendedAttributes->{$name}) {
     288        for my $rightValue (split /\s*[|&]\s*/, $extendedAttributes->{$name}) {
    289289            if (!exists $idlAttributes->{$name}{$rightValue}) {
    290290                $error = "Unknown IDL attribute [$name=" . $extendedAttributes->{$name} . "] is found at $idlFile.";
  • trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl

    r152080 r152100  
    3131my $windowConstructorsFile;
    3232my $workerGlobalScopeConstructorsFile;
     33my $sharedWorkerGlobalScopeConstructorsFile;
     34my $dedicatedWorkerGlobalScopeConstructorsFile;
    3335my $supplementalMakefileDeps;
    3436
     
    3941           'windowConstructorsFile=s' => \$windowConstructorsFile,
    4042           'workerGlobalScopeConstructorsFile=s' => \$workerGlobalScopeConstructorsFile,
     43           'sharedWorkerGlobalScopeConstructorsFile=s' => \$sharedWorkerGlobalScopeConstructorsFile,
     44           'dedicatedWorkerGlobalScopeConstructorsFile=s' => \$dedicatedWorkerGlobalScopeConstructorsFile,
    4145           'supplementalMakefileDeps=s' => \$supplementalMakefileDeps);
    4246
     
    4549die('Must specify an output file using --windowConstructorsFile.') unless defined($windowConstructorsFile);
    4650die('Must specify an output file using --workerGlobalScopeConstructorsFile.') unless defined($workerGlobalScopeConstructorsFile);
     51die('Must specify an output file using --sharedWorkerGlobalScopeConstructorsFile.') unless defined($sharedWorkerGlobalScopeConstructorsFile);
     52die('Must specify an output file using --dedicatedWorkerGlobalScopeConstructorsFile.') unless defined($dedicatedWorkerGlobalScopeConstructorsFile);
    4753die('Must specify the file listing all IDLs using --idlFilesList.') unless defined($idlFilesList);
    4854
     
    5864my $windowConstructorsCode = "";
    5965my $workerGlobalScopeConstructorsCode = "";
     66my $sharedWorkerGlobalScopeConstructorsCode = "";
     67my $dedicatedWorkerGlobalScopeConstructorsCode = "";
    6068
    6169# Get rid of duplicates in idlFiles array.
     
    96104        my $extendedAttributes = getInterfaceExtendedAttributesFromIDL($idlFileContents);
    97105        unless ($extendedAttributes->{"NoInterfaceObject"}) {
    98             my $globalContext = $extendedAttributes->{"GlobalContext"} || "WindowOnly";
     106            my @globalContexts = split("&", $extendedAttributes->{"GlobalContext"} || "DOMWindow");
    99107            my $attributeCode = GenerateConstructorAttribute($interfaceName, $extendedAttributes);
    100             $windowConstructorsCode .= $attributeCode unless $globalContext eq "WorkerOnly";
    101             $workerGlobalScopeConstructorsCode .= $attributeCode unless $globalContext eq "WindowOnly"
     108            $windowConstructorsCode .= $attributeCode if grep(/^DOMWindow$/, @globalContexts);
     109            $workerGlobalScopeConstructorsCode .= $attributeCode if grep(/^WorkerGlobalScope$/, @globalContexts);
     110            $sharedWorkerGlobalScopeConstructorsCode .= $attributeCode if grep(/^SharedWorkerGlobalScope$/, @globalContexts);
     111            $dedicatedWorkerGlobalScopeConstructorsCode .= $attributeCode if grep(/^DedicatedWorkerGlobalScope$/, @globalContexts);
    102112        }
    103113    }
     
    105115}
    106116
    107 # Generate DOMWindow Constructors partial interface.
     117# Generate partial interfaces for Constructors.
    108118GeneratePartialInterface("DOMWindow", $windowConstructorsCode, $windowConstructorsFile);
    109 
    110 # Generate WorkerGlobalScope Constructors partial interface.
    111119GeneratePartialInterface("WorkerGlobalScope", $workerGlobalScopeConstructorsCode, $workerGlobalScopeConstructorsFile);
     120GeneratePartialInterface("SharedWorkerGlobalScope", $sharedWorkerGlobalScopeConstructorsCode, $sharedWorkerGlobalScopeConstructorsFile);
     121GeneratePartialInterface("DedicatedWorkerGlobalScope", $dedicatedWorkerGlobalScopeConstructorsCode, $dedicatedWorkerGlobalScopeConstructorsFile);
    112122
    113123# Resolves partial interfaces and implements dependencies.
  • trunk/Source/WebCore/dom/MessageChannel.idl

    r151495 r152100  
    2626
    2727[
    28     GlobalContext=WindowAndWorker,
     28    GlobalContext=DOMWindow&WorkerGlobalScope,
    2929    Conditional=CHANNEL_MESSAGING,
    3030    Constructor,
  • trunk/Source/WebCore/dom/MessageEvent.idl

    r151169 r152100  
    2727
    2828[
    29     GlobalContext=WindowAndWorker,
     29    GlobalContext=DOMWindow&WorkerGlobalScope,
    3030    JSNoStaticTables,
    3131    ConstructorTemplate=Event
  • trunk/Source/WebCore/fileapi/Blob.idl

    r151169 r152100  
    3030
    3131[
    32     GlobalContext=WindowAndWorker,
     32    GlobalContext=DOMWindow&WorkerGlobalScope,
    3333    GenerateIsReachable=Impl,
    3434    CustomToJSObject,
  • trunk/Source/WebCore/fileapi/FileReader.idl

    r151495 r152100  
    3131
    3232[
    33     GlobalContext=WindowAndWorker,
     33    GlobalContext=DOMWindow&WorkerGlobalScope,
    3434    Conditional=BLOB,
    3535    ActiveDOMObject,
  • trunk/Source/WebCore/fileapi/FileReaderSync.idl

    r151336 r152100  
    3030
    3131[
    32     GlobalContext=WorkerOnly,
     32    GlobalContext=WorkerGlobalScope,
    3333    Conditional=BLOB,
    3434    Constructor,
  • trunk/Source/WebCore/html/DOMURL.idl

    r151169 r152100  
    2626
    2727[
    28     GlobalContext=WindowAndWorker,
     28    GlobalContext=DOMWindow&WorkerGlobalScope,
    2929    Conditional=BLOB,
    3030    Constructor,
  • trunk/Source/WebCore/html/canvas/ArrayBuffer.idl

    r151169 r152100  
    2525
    2626[
    27     GlobalContext=WindowAndWorker,
     27    GlobalContext=DOMWindow&WorkerGlobalScope,
    2828    GenerateIsReachable=Impl,
    2929    CustomConstructor(unsigned long length),
  • trunk/Source/WebCore/html/canvas/DataView.idl

    r151563 r152100  
    2525
    2626[
    27     GlobalContext=WindowAndWorker,
     27    GlobalContext=DOMWindow&WorkerGlobalScope,
    2828    CustomConstructor(ArrayBuffer buffer, optional unsigned long byteOffset, optional unsigned long byteLength),
    2929    CustomToJSObject,
  • trunk/Source/WebCore/html/canvas/Float32Array.idl

    r151499 r152100  
    2626
    2727[
    28     GlobalContext=WindowAndWorker,
     28    GlobalContext=DOMWindow&WorkerGlobalScope,
    2929    ConstructorTemplate=TypedArray,
    3030    CustomIndexedSetter,
  • trunk/Source/WebCore/html/canvas/Float64Array.idl

    r151499 r152100  
    2626
    2727[
    28     GlobalContext=WindowAndWorker,
     28    GlobalContext=DOMWindow&WorkerGlobalScope,
    2929    ConstructorTemplate=TypedArray,
    3030    CustomIndexedSetter,
  • trunk/Source/WebCore/html/canvas/Int16Array.idl

    r151499 r152100  
    2525
    2626[
    27     GlobalContext=WindowAndWorker,
     27    GlobalContext=DOMWindow&WorkerGlobalScope,
    2828    ConstructorTemplate=TypedArray,
    2929    CustomIndexedSetter,
  • trunk/Source/WebCore/html/canvas/Int32Array.idl

    r151499 r152100  
    2626
    2727[
    28     GlobalContext=WindowAndWorker,
     28    GlobalContext=DOMWindow&WorkerGlobalScope,
    2929    ConstructorTemplate=TypedArray,
    3030    CustomIndexedSetter,
  • trunk/Source/WebCore/html/canvas/Int8Array.idl

    r151499 r152100  
    2626
    2727[
    28     GlobalContext=WindowAndWorker,
     28    GlobalContext=DOMWindow&WorkerGlobalScope,
    2929    ConstructorTemplate=TypedArray,
    3030    CustomIndexedSetter,
  • trunk/Source/WebCore/html/canvas/Uint16Array.idl

    r151499 r152100  
    2626
    2727[
    28     GlobalContext=WindowAndWorker,
     28    GlobalContext=DOMWindow&WorkerGlobalScope,
    2929    ConstructorTemplate=TypedArray,
    3030    CustomIndexedSetter,
  • trunk/Source/WebCore/html/canvas/Uint32Array.idl

    r151499 r152100  
    2626
    2727[
    28     GlobalContext=WindowAndWorker,
     28    GlobalContext=DOMWindow&WorkerGlobalScope,
    2929    ConstructorTemplate=TypedArray,
    3030    CustomIndexedSetter,
  • trunk/Source/WebCore/html/canvas/Uint8Array.idl

    r151499 r152100  
    2626
    2727[
    28     GlobalContext=WindowAndWorker,
     28    GlobalContext=DOMWindow&WorkerGlobalScope,
    2929    ConstructorTemplate=TypedArray,
    3030    CustomIndexedSetter,
  • trunk/Source/WebCore/html/canvas/Uint8ClampedArray.idl

    r151499 r152100  
    2626
    2727[
    28     GlobalContext=WindowAndWorker,
     28    GlobalContext=DOMWindow&WorkerGlobalScope,
    2929    ConstructorTemplate=TypedArray,
    3030    CustomIndexedSetter,
  • trunk/Source/WebCore/page/EventSource.idl

    r151495 r152100  
    3131
    3232[
    33     GlobalContext=WindowAndWorker,
     33    GlobalContext=DOMWindow&WorkerGlobalScope,
    3434    ActiveDOMObject,
    3535    Constructor(DOMString url, optional Dictionary eventSourceInit),
  • trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl

    r152080 r152100  
    3030
    3131[
    32     NoInterfaceObject,
     32    GlobalContext=DedicatedWorkerGlobalScope,
    3333    Conditional=WORKERS,
    3434    ExtendsDOMGlobalObject,
  • trunk/Source/WebCore/workers/SharedWorkerGlobalScope.idl

    r152080 r152100  
    3030
    3131[
    32     NoInterfaceObject,
     32    GlobalContext=SharedWorkerGlobalScope,
    3333    Conditional=SHARED_WORKERS,
    3434    ExtendsDOMGlobalObject,
  • trunk/Source/WebCore/workers/WorkerGlobalScope.idl

    r152080 r152100  
    2626
    2727[
    28     NoInterfaceObject,
     28    GlobalContext=WorkerGlobalScope,
    2929    Conditional=WORKERS,
    3030    JSCustomMarkFunction,
  • trunk/Source/WebCore/workers/WorkerLocation.idl

    r151169 r152100  
    2828
    2929[
    30     GlobalContext=WorkerOnly,
     30    GlobalContext=WorkerGlobalScope,
    3131    Conditional=WORKERS,
    3232    GenerateIsReachable=Impl,
  • trunk/Source/WebCore/xml/XMLHttpRequest.idl

    r151495 r152100  
    3838
    3939[
    40     GlobalContext=WindowAndWorker,
     40    GlobalContext=DOMWindow&WorkerGlobalScope,
    4141    ActiveDOMObject,
    4242    Constructor,
  • trunk/Source/cmake/WebKitMacros.cmake

    r151169 r152100  
    3939    set(_args ${ARGN})
    4040    list(LENGTH _args _argCount)
    41     if (_argCount EQUAL 3)
     41    if (_argCount EQUAL 5)
    4242        list(GET _args 0 _supplemental_dependency_file)
    4343        if (_supplemental_dependency_file)
     
    4545        endif ()
    4646        list(GET _args 1 _window_constructors_file)
    47         list(GET _args 2 _workercontext_constructors_file)
     47        list(GET _args 2 _workerglobalscope_constructors_file)
     48        list(GET _args 3 _sharedworkerglobalscope_constructors_file)
     49        list(GET _args 4 _dedicatedworkerglobalscope_constructors_file)
    4850    endif ()
    4951
     
    5456            OUTPUT ${_destination}/${_prefix}${_name}.cpp ${_destination}/${_prefix}${_name}.h
    5557            MAIN_DEPENDENCY ${_file}
    56             DEPENDS ${BINDING_GENERATOR} ${SCRIPTS_BINDINGS} ${_supplemental_dependency_file} ${_idl_attributes_file} ${_window_constructors_file} ${_workercontext_constructors_file}
     58            DEPENDS ${BINDING_GENERATOR} ${SCRIPTS_BINDINGS} ${_supplemental_dependency_file} ${_idl_attributes_file} ${_window_constructors_file} ${_workerglobalscope_constructors_file} ${_sharedworkerglobalscope_constructors_file} ${_dedicatedworkerglobalscope_constructors_file}
    5759            COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${BINDING_GENERATOR} --defines "${_features}" --generator ${_generator} ${_idl_includes} --outputDir "${_destination}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --idlAttributesFile ${_idl_attributes_file} ${_supplemental_dependency} ${_file}
    5860            WORKING_DIRECTORY ${_base_dir}
  • trunk/Tools/ChangeLog

    r152095 r152100  
     12013-06-27  Christophe Dumez  <ch.dumez@sisa.samsung.com>
     2
     3        Remove [NoInterfaceObject] from WorkerGlobalScope
     4        https://bugs.webkit.org/show_bug.cgi?id=118071
     5
     6        Reviewed by Kentaro Hara.
     7
     8        Update bindings test script to pass 2 additional parameters
     9        now needed by the preprocess-idls.pl script.
     10
     11        * Scripts/webkitpy/bindings/main.py:
     12        (BindingsTests.generate_supplemental_dependency):
     13        (BindingsTests.main):
     14
    1152013-06-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
    216
  • trunk/Tools/Scripts/webkitpy/bindings/main.py

    r152082 r152100  
    6262        return exit_code
    6363
    64     def generate_supplemental_dependency(self, input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file):
     64    def generate_supplemental_dependency(self, input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file, sharedworkerglobalscope_constructors_file, dedicatedworkerglobalscope_constructors_file):
    6565        idl_files_list = tempfile.mkstemp()
    6666        for input_file in os.listdir(input_directory):
     
    7878               '--supplementalDependencyFile', supplemental_dependency_file,
    7979               '--windowConstructorsFile', window_constructors_file,
    80                '--workerGlobalScopeConstructorsFile', workerglobalscope_constructors_file]
     80               '--workerGlobalScopeConstructorsFile', workerglobalscope_constructors_file,
     81               '--sharedWorkerGlobalScopeConstructorsFile', sharedworkerglobalscope_constructors_file,
     82               '--dedicatedWorkerGlobalScopeConstructorsFile', dedicatedworkerglobalscope_constructors_file]
    8183
    8284        exit_code = 0
     
    155157        window_constructors_file = tempfile.mkstemp()[1]
    156158        workerglobalscope_constructors_file = tempfile.mkstemp()[1]
    157         if self.generate_supplemental_dependency(input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file):
     159        sharedworkerglobalscope_constructors_file = tempfile.mkstemp()[1]
     160        dedicatedworkerglobalscope_constructors_file = tempfile.mkstemp()[1]
     161        if self.generate_supplemental_dependency(input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file, sharedworkerglobalscope_constructors_file, dedicatedworkerglobalscope_constructors_file):
    158162            print 'Failed to generate a supplemental dependency file.'
    159163            os.remove(supplemental_dependency_file)
Note: See TracChangeset for help on using the changeset viewer.