Changeset 190608 in webkit


Ignore:
Timestamp:
Oct 5, 2015 11:20:58 PM (9 years ago)
Author:
youenn.fablet@crf.canon.fr
Message:

Migrate streams API to JS Builtins
https://bugs.webkit.org/show_bug.cgi?id=147092

Reviewed by Darin Adler.

Source/WebCore:

Moved ReadableStream implementation from C++ to JS Builtins.
Created specific private constructors for ReadableStreamReader and ReadableStreamController.
Added these constructors to JSDOMWindowBase.
Constructors are based on a template found in JSDOMConstructor which might serve to webidl-generated classes as well.

Covered by existing tests.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Modules/streams/ReadableStream.cpp: Removed.
  • Modules/streams/ReadableStream.h: Removed.
  • Modules/streams/ReadableStream.idl:
  • Modules/streams/ReadableStream.js:

(strategy.size):
(initializeReadableStream):
(cancel):
(getReader):
(pipeTo):
(tee):
(locked):

  • Modules/streams/ReadableStreamController.h:
  • Modules/streams/ReadableStreamController.idl:
  • Modules/streams/ReadableStreamController.js: Added.

(enqueue):
(error):
(close):
(desiredSize):

  • Modules/streams/ReadableStreamInternals.js:

(privateInitializeReadableStreamReader):
(privateInitializeReadableStreamController):
(isReadableStream):
(isReadableStreamReader):
(isReadableStreamController):
(errorReadableStream):
(requestReadableStreamPull):
(getReadableStreamDesiredSize):
(releaseReadableStreamReader):
(cancelReadableStream):
(finishClosingReadableStream):
(closeReadableStream):
(closeReadableStreamReader):
(enqueueInReadableStream):
(readFromReadableStreamReader):
(invokeOrNoop):
(promiseInvokeOrNoop):

  • Modules/streams/ReadableStreamReader.cpp: Removed.
  • Modules/streams/ReadableStreamReader.h:
  • Modules/streams/ReadableStreamReader.idl:
  • Modules/streams/ReadableStreamReader.js: Copied from Source/WebCore/Modules/streams/ReadableStream.js.

(cancel):
(read):
(releaseLock):
(closed):

  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSDOMConstructor.h: Added.

(WebCore::JSBuiltinConstructor::create):
(WebCore::JSBuiltinConstructor::createStructure):
(WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
(WebCore::JSBuiltinConstructor::initializeProperties):
(WebCore::JSBuiltinConstructor<JSClass>::finishCreation):
(WebCore::JSBuiltinConstructor<JSClass>::construct):
(WebCore::JSBuiltinConstructor<JSClass>::getConstructData):

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::finishCreation):

  • bindings/js/JSReadableStreamControllerCustom.cpp: Removed.
  • bindings/js/JSReadableStreamCustom.cpp: Removed.
  • bindings/js/JSReadableStreamPrivateConstructors.cpp: Added.

(WebCore::constructJSReadableStreamController):
(WebCore::constructJSReadableStreamReader):
(WebCore::JSBuiltinConstructor<JSReadableStreamReader>::createJSObject):
(WebCore::JSBuiltinConstructor<JSReadableStreamController>::createJSObject):
(WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createInitializeFunction):
(WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createInitializeFunction):
(WebCore::createReadableStreamReaderPrivateConstructor):
(WebCore::createReadableStreamControllerPrivateConstructor):

  • bindings/js/JSReadableStreamPrivateConstructors.h: Added.
  • bindings/js/JSReadableStreamReaderCustom.cpp: Removed.
  • bindings/js/ReadableJSStream.cpp: Removed.
  • bindings/js/ReadableJSStream.h: Removed.
  • bindings/js/WebCoreBuiltinNames.h: Added.

(WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):

  • bindings/js/WebCoreJSBuiltins.cpp:
  • bindings/js/WebCoreJSClientData.h:

(WebCore::WebCoreJSClientData::WebCoreJSClientData):
(WebCore::WebCoreJSClientData::builtinNames):
(WebCore::WebCoreJSClientData::readableStreamControllerBuiltins):
(WebCore::WebCoreJSClientData::readableStreamReaderBuiltins):

LayoutTests:

Rebasing some tests, one subtest passing, two others still failing but with different reasons.

  • streams/reference-implementation/brand-checks-expected.txt:
  • streams/reference-implementation/readable-stream-reader-expected.txt:
Location:
trunk
Files:
5 added
8 deleted
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r190605 r190608  
     12015-10-05  Youenn Fablet  <youenn.fablet@crf.canon.fr>
     2
     3        Migrate streams API to JS Builtins
     4        https://bugs.webkit.org/show_bug.cgi?id=147092
     5
     6        Reviewed by Darin Adler.
     7
     8        Rebasing some tests, one subtest passing, two others still failing but with different reasons.
     9
     10        * streams/reference-implementation/brand-checks-expected.txt:
     11        * streams/reference-implementation/readable-stream-reader-expected.txt:
     12
    1132015-10-05  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/LayoutTests/streams/reference-implementation/brand-checks-expected.txt

    r190162 r190608  
    55FAIL ReadableStream.prototype.getReader enforces a brand check Can't find variable: WritableStream
    66PASS ReadableStream.prototype.pipeThrough works generically on its this and its arguments
    7 FAIL ReadableStream.prototype.pipeTo works generically on its this and its arguments Can only call ReadableStream.pipeTo on instances of ReadableStream
     7FAIL ReadableStream.prototype.pipeTo works generically on its this and its arguments pipeTo is not implemented
    88FAIL ReadableStream.prototype.tee enforces a brand check Can't find variable: WritableStream
    99PASS ReadableStreamReader enforces a brand check on its argument
    10 FAIL ReadableStreamReader.prototype.closed enforces a brand check undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, getterName).get')
     10PASS ReadableStreamReader.prototype.closed enforces a brand check
    1111PASS ReadableStreamReader.prototype.cancel enforces a brand check
    1212PASS ReadableStreamReader.prototype.read enforces a brand check
  • trunk/LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt

    r188684 r190608  
    22PASS Can get the ReadableStreamReader constructor indirectly
    33PASS ReadableStreamReader constructor should get a ReadableStream object as argument
    4 FAIL ReadableStreamReader instances should have the correct list of properties assert_array_equals: lengths differ, expected 5 got 4
     4FAIL ReadableStreamReader instances should have the correct list of properties assert_equals: method should be non-enumerable expected false but got true
    55PASS ReadableStreamReader closed should always return the same promise object
    66PASS Constructing a ReadableStreamReader directly should fail if the stream is already locked (via direct construction)
  • trunk/Source/WebCore/CMakeLists.txt

    r190421 r190608  
    980980    Modules/speech/SpeechSynthesisVoice.cpp
    981981
    982     Modules/streams/ReadableStream.cpp
    983     Modules/streams/ReadableStreamReader.cpp
    984 
    985982    Modules/vibration/NavigatorVibration.cpp
    986983    Modules/vibration/Vibration.cpp
     
    12091206    bindings/js/JSPluginElementFunctions.cpp
    12101207    bindings/js/JSPopStateEventCustom.cpp
     1208    bindings/js/JSReadableStreamPrivateConstructors.cpp
    12111209    bindings/js/JSRTCIceCandidateCustom.cpp
    12121210    bindings/js/JSRTCPeerConnectionCustom.cpp
    12131211    bindings/js/JSRTCSessionDescriptionCustom.cpp
    12141212    bindings/js/JSRTCStatsResponseCustom.cpp
    1215     bindings/js/JSReadableStreamControllerCustom.cpp
    1216     bindings/js/JSReadableStreamCustom.cpp
    1217     bindings/js/JSReadableStreamReaderCustom.cpp
    12181213    bindings/js/JSSQLResultSetRowListCustom.cpp
    12191214    bindings/js/JSSQLTransactionCustom.cpp
     
    12421237    bindings/js/JSXPathResultCustom.cpp
    12431238    bindings/js/JSXSLTProcessorCustom.cpp
    1244     bindings/js/ReadableJSStream.cpp
    12451239    bindings/js/ScheduledAction.cpp
    12461240    bindings/js/ScriptCachedFrameData.cpp
     
    33563350    ${WEBCORE_DIR}/Modules/streams/CountQueuingStrategy.js
    33573351    ${WEBCORE_DIR}/Modules/streams/ReadableStream.js
     3352    ${WEBCORE_DIR}/Modules/streams/ReadableStreamController.js
    33583353    ${WEBCORE_DIR}/Modules/streams/ReadableStreamInternals.js
     3354    ${WEBCORE_DIR}/Modules/streams/ReadableStreamReader.js
    33593355)
    33603356
  • trunk/Source/WebCore/ChangeLog

    r190605 r190608  
     12015-10-05  Youenn Fablet  <youenn.fablet@crf.canon.fr>
     2
     3        Migrate streams API to JS Builtins
     4        https://bugs.webkit.org/show_bug.cgi?id=147092
     5
     6        Reviewed by Darin Adler.
     7
     8        Moved ReadableStream implementation from C++ to JS Builtins.
     9        Created specific private constructors for ReadableStreamReader and ReadableStreamController.
     10        Added these constructors to  JSDOMWindowBase.
     11        Constructors are based on a template found in JSDOMConstructor which might serve to webidl-generated classes as well.
     12
     13        Covered by existing tests.
     14
     15        * CMakeLists.txt:
     16        * DerivedSources.make:
     17        * Modules/streams/ReadableStream.cpp: Removed.
     18        * Modules/streams/ReadableStream.h: Removed.
     19        * Modules/streams/ReadableStream.idl:
     20        * Modules/streams/ReadableStream.js:
     21        (strategy.size):
     22        (initializeReadableStream):
     23        (cancel):
     24        (getReader):
     25        (pipeTo):
     26        (tee):
     27        (locked):
     28        * Modules/streams/ReadableStreamController.h:
     29        * Modules/streams/ReadableStreamController.idl:
     30        * Modules/streams/ReadableStreamController.js: Added.
     31        (enqueue):
     32        (error):
     33        (close):
     34        (desiredSize):
     35        * Modules/streams/ReadableStreamInternals.js:
     36        (privateInitializeReadableStreamReader):
     37        (privateInitializeReadableStreamController):
     38        (isReadableStream):
     39        (isReadableStreamReader):
     40        (isReadableStreamController):
     41        (errorReadableStream):
     42        (requestReadableStreamPull):
     43        (getReadableStreamDesiredSize):
     44        (releaseReadableStreamReader):
     45        (cancelReadableStream):
     46        (finishClosingReadableStream):
     47        (closeReadableStream):
     48        (closeReadableStreamReader):
     49        (enqueueInReadableStream):
     50        (readFromReadableStreamReader):
     51        (invokeOrNoop):
     52        (promiseInvokeOrNoop):
     53        * Modules/streams/ReadableStreamReader.cpp: Removed.
     54        * Modules/streams/ReadableStreamReader.h:
     55        * Modules/streams/ReadableStreamReader.idl:
     56        * Modules/streams/ReadableStreamReader.js: Copied from Source/WebCore/Modules/streams/ReadableStream.js.
     57        (cancel):
     58        (read):
     59        (releaseLock):
     60        (closed):
     61        * WebCore.vcxproj/WebCore.vcxproj:
     62        * WebCore.vcxproj/WebCore.vcxproj.filters:
     63        * WebCore.xcodeproj/project.pbxproj:
     64        * bindings/js/JSBindingsAllInOne.cpp:
     65        * bindings/js/JSDOMConstructor.h: Added.
     66        (WebCore::JSBuiltinConstructor::create):
     67        (WebCore::JSBuiltinConstructor::createStructure):
     68        (WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
     69        (WebCore::JSBuiltinConstructor::initializeProperties):
     70        (WebCore::JSBuiltinConstructor<JSClass>::finishCreation):
     71        (WebCore::JSBuiltinConstructor<JSClass>::construct):
     72        (WebCore::JSBuiltinConstructor<JSClass>::getConstructData):
     73        * bindings/js/JSDOMWindowBase.cpp:
     74        (WebCore::JSDOMWindowBase::finishCreation):
     75        * bindings/js/JSReadableStreamControllerCustom.cpp: Removed.
     76        * bindings/js/JSReadableStreamCustom.cpp: Removed.
     77        * bindings/js/JSReadableStreamPrivateConstructors.cpp: Added.
     78        (WebCore::constructJSReadableStreamController):
     79        (WebCore::constructJSReadableStreamReader):
     80        (WebCore::JSBuiltinConstructor<JSReadableStreamReader>::createJSObject):
     81        (WebCore::JSBuiltinConstructor<JSReadableStreamController>::createJSObject):
     82        (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createInitializeFunction):
     83        (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createInitializeFunction):
     84        (WebCore::createReadableStreamReaderPrivateConstructor):
     85        (WebCore::createReadableStreamControllerPrivateConstructor):
     86        * bindings/js/JSReadableStreamPrivateConstructors.h: Added.
     87        * bindings/js/JSReadableStreamReaderCustom.cpp: Removed.
     88        * bindings/js/ReadableJSStream.cpp: Removed.
     89        * bindings/js/ReadableJSStream.h: Removed.
     90        * bindings/js/WebCoreBuiltinNames.h: Added.
     91        (WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
     92        * bindings/js/WebCoreJSBuiltins.cpp:
     93        * bindings/js/WebCoreJSClientData.h:
     94        (WebCore::WebCoreJSClientData::WebCoreJSClientData):
     95        (WebCore::WebCoreJSClientData::builtinNames):
     96        (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins):
     97        (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins):
     98
    1992015-10-05  Chris Dumez  <cdumez@apple.com>
    2100
  • trunk/Source/WebCore/DerivedSources.make

    r190482 r190608  
    12561256    $(WebCore)/Modules/streams/CountQueuingStrategy.js \
    12571257    $(WebCore)/Modules/streams/ReadableStream.js \
     1258    $(WebCore)/Modules/streams/ReadableStreamController.js \
    12581259    $(WebCore)/Modules/streams/ReadableStreamInternals.js \
     1260    $(WebCore)/Modules/streams/ReadableStreamReader.js \
    12591261#
    12601262
  • trunk/Source/WebCore/Modules/streams/ReadableStream.idl

    r190401 r190608  
    2929
    3030[
    31     ConstructorCallWith=ScriptState,
    32     Constructor([Default=Undefined] optional any source, [Default=Undefined] optional Dictionary strategy),
    3331    Conditional=STREAMS_API,
    34     SkipVTableValidation
     32    JSBuiltinConstructor
    3533] interface ReadableStream {
    36     [RaisesException] Promise cancel([Default=Undefined] optional any reason);
    37     [RaisesException] ReadableStreamReader getReader();
    38     [Custom] Promise pipeTo(any streams, any options);
     34    [JSBuiltin] Promise cancel([Default=Undefined] optional any reason);
     35    [JSBuiltin] Object getReader();
     36    [JSBuiltin] Promise pipeTo(any streams, any options);
    3937    [JSBuiltin] Object pipeThrough(any dest, any options);
    4038    [JSBuiltin] Object tee();
    4139
    42     readonly attribute boolean locked;
     40    [JSBuiltin] readonly attribute boolean locked;
    4341};
  • trunk/Source/WebCore/Modules/streams/ReadableStream.js

    r190401 r190608  
    2424 */
    2525
     26function initializeReadableStream(underlyingSource, strategy)
     27{
     28    "use strict";
     29
     30     if (typeof underlyingSource === "undefined")
     31         underlyingSource = { };
     32     if (typeof strategy === "undefined")
     33         strategy = { highWaterMark: 1, size: function() { return 1; } };
     34
     35    if (!@isObject(underlyingSource))
     36        throw new @TypeError("ReadableStream constructor takes an object as first argument");
     37
     38    if (strategy !== undefined && !@isObject(strategy))
     39        throw new @TypeError("ReadableStream constructor takes an object as second argument, if any");
     40
     41    this.@underlyingSource = underlyingSource;
     42
     43    this.@queue = [];
     44    this.@queueSize = 0;
     45    this.@state = @readableStreamReadable;
     46    this.@started = false;
     47    this.@closeRequested = false;
     48    this.@pullAgain = false;
     49    this.@pulling = false;
     50    this.@reader = undefined;
     51    this.@storedError = undefined;
     52    this.@controller = new @ReadableStreamController(this);
     53    this.@strategySize = strategy.size;
     54    this.@highWaterMark = Number(strategy.highWaterMark);
     55
     56    if (Number.isNaN(this.@highWaterMark))
     57        throw new TypeError("highWaterMark parameter is not correct");
     58    if (this.@highWaterMark < 0)
     59        throw new RangeError("highWaterMark is negative");
     60
     61    var result = @invokeOrNoop(underlyingSource, "start", [this.@controller]);
     62    var _this = this;
     63    Promise.resolve(result).then(function() {
     64        _this.@started = true;
     65        @requestReadableStreamPull(_this);
     66    }, function(error) {
     67        if (_this.@state === @readableStreamReadable)
     68            @errorReadableStream(_this, error);
     69    });
     70
     71    return this;
     72}
     73
     74function cancel(reason)
     75{
     76    "use strict";
     77
     78    if (!@isReadableStream(this))
     79        return Promise.reject(new @TypeError("Function should be called on a ReadableStream"));
     80
     81    if (@isReadableStreamLocked(this))
     82        return Promise.reject(new @TypeError("ReadableStream is locked"));
     83
     84    return @cancelReadableStream(this, reason);
     85}
     86
     87function getReader()
     88{
     89    "use strict";
     90
     91    if (!@isReadableStream(this))
     92        throw new @TypeError("Function should be called on a ReadableStream");
     93
     94    if (@isReadableStreamLocked(this))
     95        throw new @TypeError("ReadableStream is locked");
     96
     97    return new @ReadableStreamReader(this);
     98}
     99
    26100function pipeThrough(streams, options)
    27101{
     
    32106}
    33107
     108function pipeTo(dest)
     109{
     110    "use strict";
     111
     112    throw new @TypeError("pipeTo is not implemented");
     113}
     114
    34115function tee()
    35116{
    36117    "use strict";
    37118
    38     // TODO: check this is a ReadableStream
    39     return @teeReadableStream(this, false)
     119    if (!@isReadableStream(this))
     120        throw new @TypeError("Function should be called on a ReadableStream");
     121
     122    throw new @TypeError("tee is not implemented");
    40123}
     124
     125function locked()
     126{
     127    "use strict";
     128
     129    if (!@isReadableStream(this))
     130        throw new @TypeError("Function should be called on a ReadableStream");
     131
     132    return @isReadableStreamLocked(this);
     133}
  • trunk/Source/WebCore/Modules/streams/ReadableStreamController.h

    r190028 r190608  
    3333#if ENABLE(STREAMS_API)
    3434
    35 #include "ReadableJSStream.h"
     35#include <wtf/RefCounted.h>
    3636
    3737namespace WebCore {
    3838
    39 typedef int ExceptionCode;
    40 
    41 // This class is only used for JS source readable streams to allow enqueuing, closing or erroring a readable stream.
    42 // Its definition is at https://streams.spec.whatwg.org/#rs-controller-class.
    43 // Note that its constructor is taking a ReadableJSStream as it should only be used for JS sources.
    44 class ReadableStreamController {
     39// This is a dummy class needed as we cannot yet use JSBuiltinConstructor with NoInterfaceObject.
     40// Implementation of ReadableStreamController functionality is done in ReadableStreamController.js
     41// FIXME: Find a way to remove that class.
     42class ReadableStreamController final : public RefCounted<ReadableStreamController> {
    4543public:
    46     explicit ReadableStreamController(ReadableJSStream& stream)
    47         : m_stream(stream) { }
    48 
    49     ReadableJSStream& stream() { return m_stream; }
    50 
    51     void error(JSC::ExecState& state, JSC::JSValue value, ExceptionCode& ec) { m_stream.error(state, value, ec); }
    52 
    53     void enqueue(JSC::ExecState& state, JSC::JSValue value) { m_stream.enqueue(state, value); }
    54 
    55     void ref() { m_stream.ref(); }
    56     void deref() { m_stream.deref(); }
    57 
    58     void close(ExceptionCode& ec) { m_stream.close(ec); }
    59     double desiredSize() const { return m_stream.desiredSize(); }
    60 
     44    static Ref<ReadableStreamController> create() { return adoptRef(* new ReadableStreamController); }
    6145private:
    62     ReadableJSStream& m_stream;
     46    ReadableStreamController() { }
    6347};
    6448
  • trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl

    r186231 r190608  
    3434    NoInterfaceObject
    3535] interface ReadableStreamController {
    36     [CallWith=ScriptState] void enqueue([Default=Undefined] optional any chunk);
    37     [RaisesException] void close();
    38     [CallWith=ScriptState, RaisesException] void error([Default=Undefined] optional any error);
     36    [JSBuiltin] void enqueue([Default=Undefined] optional any chunk);
     37    [JSBuiltin] void close();
     38    [JSBuiltin] void error([Default=Undefined] optional any error);
    3939
    40     readonly attribute double desiredSize;
     40    [JSBuiltin] readonly attribute double desiredSize;
    4141};
  • trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js

    r190401 r190608  
    2424 */
    2525
     26function privateInitializeReadableStreamReader(stream)
     27{
     28    "use strict";
     29
     30    if (!@isReadableStream(stream))
     31       throw new @TypeError("ReadableStreamReader needs a ReadableStream");
     32    if (@isReadableStreamLocked(stream))
     33       throw new @TypeError("ReadableStream is locked");
     34
     35    this.@state = stream.@state;
     36    this.@readRequests = [];
     37    if (stream.@state === @readableStreamReadable) {
     38        this.@ownerReadableStream = stream;
     39        this.@storedError = undefined;
     40        stream.@reader = this;
     41        this.@closedPromise = new Promise(function(resolve, reject) {
     42            stream.@reader.@closedPromiseResolve = resolve;
     43            stream.@reader.@closedPromiseReject = reject;
     44        });
     45        return this;
     46    }
     47    if (stream.@state === @readableStreamClosed) {
     48        this.@ownerReadableStream = null;
     49        this.@storedError = undefined;
     50        this.@closedPromise = Promise.resolve();
     51        return this;
     52    }
     53    // TODO: ASSERT(stream.@state === @readableStreamErrored);
     54    this.@ownerReadableStream = null;
     55    this.@storedError = stream.@storedError;
     56    this.@closedPromise = Promise.reject(stream.@storedError);
     57
     58    return this;
     59}
     60
     61function privateInitializeReadableStreamController(stream)
     62{
     63    "use strict";
     64
     65    if (!@isReadableStream(stream))
     66        throw new @TypeError("ReadableStreamController needs a ReadableStream");
     67    if (typeof stream.@controller !== "undefined")
     68        throw new @TypeError("ReadableStream already has a controller");
     69    this.@controlledReadableStream = stream;
     70
     71    return this;
     72}
     73
    2674function teeReadableStream(stream, shouldClone)
    2775{
     
    3078    throw new @TypeError("tee is not implemented");
    3179}
     80
     81function isReadableStream(stream)
     82{
     83    "use strict";
     84
     85    return @isObject(stream) && !!stream.@underlyingSource;
     86}
     87
     88function isReadableStreamReader(reader)
     89{
     90    "use strict";
     91
     92    return @isObject(reader) && typeof reader.@ownerReadableStream !== "undefined";
     93}
     94
     95function isReadableStreamController(controller)
     96{
     97    "use strict";
     98
     99    return @isObject(controller) && !!controller.@controlledReadableStream;
     100}
     101
     102function errorReadableStream(stream, error)
     103{
     104    "use strict";
     105
     106    // TODO: ASSERT(stream.@state === @readableStreamReadable);
     107    stream.@queue = [];
     108    stream.@storedError = error;
     109    stream.@state = @readableStreamErrored;
     110
     111    if (!stream.@reader)
     112        return;
     113    var reader = stream.@reader;
     114
     115    var requests = reader.@readRequests;
     116    for (var index = 0, length = requests.length; index < length; ++index)
     117        requests[index].reject(error);
     118    reader.@readRequests = [];
     119
     120    @releaseReadableStreamReader(reader);
     121    reader.@storedError = error;
     122    reader.@state = @readableStreamErrored;
     123
     124    reader.@closedPromiseReject(error);
     125}
     126
     127function requestReadableStreamPull(stream)
     128{
     129    "use strict";
     130
     131    if (stream.@state !== @readableStreamReadable)
     132        return;
     133    if (stream.@closeRequested)
     134        return;
     135    if (!stream.@started)
     136        return;
     137    if ((!@isReadableStreamLocked(stream) || !stream.@reader.@readRequests.length) && @getReadableStreamDesiredSize(stream) <= 0)
     138        return;
     139 
     140    if (stream.@pulling) {
     141        stream.@pullAgain = true;
     142        return;
     143    }
     144
     145    stream.@pulling = true;
     146
     147    var promise = @promiseInvokeOrNoop(stream.@underlyingSource, "pull", [stream.@controller]);
     148    promise.then(function() {
     149        stream.@pulling = false;
     150        if (stream.@pullAgain) {
     151            stream.@pullAgain = false;
     152            @requestReadableStreamPull(stream);
     153        }
     154    }, function(error) {
     155        @errorReadableStream(stream, error);
     156    });
     157}
     158
     159function isReadableStreamLocked(stream)
     160{
     161   "use strict";
     162
     163    return !!stream.@reader;
     164}
     165
     166function getReadableStreamDesiredSize(stream)
     167{
     168   "use strict";
     169
     170   return stream.@highWaterMark - stream.@queueSize;
     171}
     172
     173function releaseReadableStreamReader(reader)
     174{
     175    "use strict";
     176
     177    reader.@ownerReadableStream.@reader = undefined;
     178    reader.@ownerReadableStream = null;
     179}
     180
     181function cancelReadableStream(stream, reason)
     182{
     183    "use strict";
     184
     185    if (stream.@state === @readableStreamClosed)
     186        return Promise.resolve();
     187    if (stream.@state === @readableStreamErrored)
     188        return Promise.reject(stream.@storedError);
     189    stream.@queue = [];
     190    @finishClosingReadableStream(stream);
     191    return @promiseInvokeOrNoop(stream.@underlyingSource, "cancel", [reason]).then(function() { });
     192}
     193
     194function finishClosingReadableStream(stream)
     195{
     196    "use strict";
     197
     198    // TODO: ASSERT(stream.@state ===  @readableStreamReadable);
     199    stream.@state = @readableStreamClosed;
     200    var reader = stream.@reader;
     201    if (reader)
     202        @closeReadableStreamReader(reader);
     203}
     204
     205function closeReadableStream(stream)
     206{
     207    "use strict";
     208
     209    // TODO. ASSERT(!stream.@closeRequested);
     210    // TODO: ASSERT(stream.@state !== @readableStreamErrored);
     211    if (stream.@state === @readableStreamClosed)
     212        return;
     213    stream.@closeRequested = true;
     214    if (!stream.@queue.length)
     215        @finishClosingReadableStream(stream);
     216}
     217
     218function closeReadableStreamReader(reader)
     219{
     220    "use strict";
     221
     222    var requests = reader.@readRequests;
     223    for (var index = 0, length = requests.length; index < length; ++index)
     224        requests[index].resolve({value:undefined, done: true});
     225    reader.@readRequests = [];
     226    @releaseReadableStreamReader(reader);
     227    reader.@state = @readableStreamClosed;
     228    reader.@closedPromiseResolve();
     229}
     230
     231function enqueueInReadableStream(stream, chunk)
     232{
     233    "use strict";
     234
     235    // TODO: ASSERT(!stream.@closeRequested);
     236    // TODO: ASSERT(stream.@state !== @readableStreamErrored);
     237    if (stream.@state === @readableStreamClosed)
     238        return undefined;
     239    if (@isReadableStreamLocked(stream) && stream.@reader.@readRequests.length) {
     240        stream.@reader.@readRequests.shift().resolve({value: chunk, done: false});
     241        @requestReadableStreamPull(stream);
     242        return;
     243    }
     244    try {
     245        var size = 1;
     246        if (stream.@strategySize) {
     247            size = Number(stream.@strategySize(chunk));
     248            if (Number.isNaN(size) || size === +Infinity || size < 0)
     249                throw new RangeError("Chunk size is not valid");
     250        }
     251        stream.@queue.push({ value: chunk, size: size });
     252        stream.@queueSize += size;
     253    }
     254    catch(error) {
     255        @errorReadableStream(stream, error);
     256        throw error;
     257    }
     258    @requestReadableStreamPull(stream);
     259}
     260
     261function readFromReadableStreamReader(reader)
     262{
     263    "use strict";
     264
     265    if (reader.@state === @readableStreamClosed)
     266        return Promise.resolve({value: undefined, done: true});
     267    if (reader.@state === @readableStreamErrored)
     268        return Promise.reject(reader.@storedError);
     269    // TODO: ASSERT(!!reader.@ownerReadableStream);
     270    // TODO: ASSERT(reader.@ownerReadableStream.@state === @readableStreamReadable);
     271    var stream = reader.@ownerReadableStream;
     272    if (stream.@queue.length) {
     273        var chunk = stream.@queue.shift();
     274        stream.@queueSize -= chunk.size;
     275        if (!stream.@closeRequested)
     276            @requestReadableStreamPull(stream);
     277        else if (!stream.@queue.length)
     278            @finishClosingReadableStream(stream);
     279        return Promise.resolve({value: chunk.value, done: false});
     280    }
     281    var readRequest = {};
     282    var readPromise = new Promise(function(resolve, reject) {
     283        readRequest.resolve = resolve;
     284        readRequest.reject = reject;
     285    });
     286    reader.@readRequests.push(readRequest);
     287    @requestReadableStreamPull(stream);
     288    return readPromise;
     289}
     290
     291function invokeOrNoop(object, key, args)
     292{
     293    "use strict";
     294
     295    var method = object[key];
     296    if (typeof method === "undefined")
     297        return;
     298    return method.@apply(object, args);
     299}
     300
     301function promiseInvokeOrNoop(object, key, args)
     302{
     303    "use strict";
     304
     305    try {
     306        var method = object[key];
     307        if (typeof method === "undefined")
     308            return Promise.resolve();
     309        var result = method.@apply(object, args);
     310        return Promise.resolve(result);
     311    }
     312    catch(error) {
     313        return Promise.reject(error);
     314    }
     315}
  • trunk/Source/WebCore/Modules/streams/ReadableStreamReader.h

    r186414 r190608  
    3333#if ENABLE(STREAMS_API)
    3434
    35 #include "ActiveDOMObject.h"
    36 #include "ReadableStream.h"
    37 #include "ScriptWrappable.h"
    38 #include <functional>
    39 #include <wtf/Ref.h>
    4035#include <wtf/RefCounted.h>
    4136
    4237namespace WebCore {
    4338
    44 typedef int ExceptionCode;
    45 
    46 // ReadableStreamReader implements access to ReadableStream from JavaScript.
    47 // It basically allows access to the ReadableStream iff the ReadableStreamReader instance is the active reader
    48 // of the ReadableStream.
    49 // Most of this handling is happening in the custom JS binding of ReadableStreamReader.
    50 // See https://streams.spec.whatwg.org/#reader-class for more information.
    51 class ReadableStreamReader {
     39// This is a dummy class needed as we cannot yet use JSBuiltinConstructor with NoInterfaceObject.
     40// Implementation of ReadableStreamReader functionality is done in ReadableStreamReader.js
     41// FIXME: Find a way to remove that class.
     42class ReadableStreamReader final : public RefCounted<ReadableStreamReader> {
    5243public:
    53     ReadableStreamReader(ReadableStream& stream)
    54         : m_stream(stream) { }
    55 
    56     void cancel(JSC::JSValue, ReadableStream::CancelPromise&&);
    57     void closed(ReadableStream::ClosedPromise&&);
    58     void read(ReadableStream::ReadPromise&&);
    59     void releaseLock(ExceptionCode&);
    60 
    61     void ref() { m_stream.ref(); }
    62     void deref() { m_stream.deref(); }
    63 
     44    static Ref<ReadableStreamReader> create() { return adoptRef(* new ReadableStreamReader); }
    6445private:
    65     ReadableStream& m_stream;
     46    ReadableStreamReader() { }
    6647};
    6748
  • trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl

    r188209 r190608  
    3030[
    3131    Conditional=STREAMS_API,
    32     CustomConstructor(any properties),
    33     NoInterfaceObject,
    34     SkipVTableValidation
     32    CustomConstructor,
     33    ImplementationLacksVTable,
     34    NoInterfaceObject
    3535] interface ReadableStreamReader {
    36     Promise read();
    37     Promise cancel([Default=Undefined] optional any reason);
    38     [RaisesException] void releaseLock();
     36    [JSBuiltin] Promise read();
     37    [JSBuiltin] Promise cancel([Default=Undefined] optional any reason);
     38    [JSBuiltin] void releaseLock();
    3939
    40     [CustomGetter, CachedAttribute] readonly attribute Promise closed;
     40    [JSBuiltin] readonly attribute Promise closed;
    4141};
  • trunk/Source/WebCore/Modules/streams/ReadableStreamReader.js

    r190607 r190608  
    2424 */
    2525
    26 function pipeThrough(streams, options)
     26function cancel(reason)
    2727{
    2828    "use strict";
    2929
    30     this.pipeTo(streams.writable, options);
    31     return streams.readable;
     30    if (!@isReadableStreamReader(this))
     31        return Promise.reject(new @TypeError("Function should be called on a ReadableStreamReader"));
     32
     33    if (this.@state === @readableStreamClosed)
     34        return Promise.resolve();
     35
     36    if (this.@state === @readableStreamErrored)
     37        return Promise.reject(this.@storedError);
     38
     39    // TODO ASSERT(@isReadableStream(this.@ownerReadableStream));
     40    // TODO ASSERT(this.@ownerReadableStream.@state === @readableStreamReadable);
     41    return @cancelReadableStream(this.@ownerReadableStream, reason);
    3242}
    3343
    34 function tee()
     44function read()
    3545{
    3646    "use strict";
    3747
    38     // TODO: check this is a ReadableStream
    39     return @teeReadableStream(this, false)
     48    if (!@isReadableStreamReader(this))
     49        return Promise.reject(new @TypeError("Function should be called on a ReadableStreamReader"));
     50
     51    return @readFromReadableStreamReader(this);
    4052}
     53
     54function releaseLock()
     55{
     56    "use strict";
     57
     58    if (!@isReadableStreamReader(this))
     59        throw new @TypeError("Function should be called on a ReadableStreamReader");
     60
     61    if (!this.@ownerReadableStream)
     62         return;
     63
     64    if (this.@readRequests.length)
     65        throw new @TypeError();
     66
     67    @closeReadableStreamReader(this);
     68}
     69
     70function closed()
     71{
     72    "use strict";
     73
     74    if (!@isReadableStreamReader(this))
     75        return Promise.reject(new @TypeError("Callee of closed is not a ReadableStreamReader"));
     76
     77    return this.@closedPromise;
     78}
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

    r190527 r190608  
    39473947      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    39483948    </ClCompile>
    3949     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\ReadableStreamInternalsBuiltins.cpp">
    3950       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    3951       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    3952       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
    3953       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
    3954       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
    3955       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
    3956       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
    3957       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
    3958       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
    3959       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
    3960       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
    3961       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    3962     </ClCompile>
    39633949    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSReadableStreamController.cpp">
    39643950      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     
    68326818    <ClCompile Include="..\Modules\notifications\NotificationCenter.cpp" />
    68336819    <ClCompile Include="..\Modules\notifications\WorkerGlobalScopeNotifications.cpp" />
    6834     <ClCompile Include="..\Modules\streams\ReadableStream.cpp" />
    6835     <ClCompile Include="..\Modules\streams\ReadableStreamReader.cpp" />
    68366820    <ClCompile Include="..\Modules\webdatabase\ChangeVersionWrapper.cpp" />
    68376821    <ClCompile Include="..\Modules\webdatabase\Database.cpp" />
     
    1854018524      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    1854118525    </ClCompile>
    18542     <ClCompile Include="..\bindings\js\JSReadableStreamCustom.cpp">
    18543       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    18544       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    18545       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
    18546       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
    18547       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
    18548       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
    18549       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
    18550       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
    18551       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
    18552       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
    18553       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
    18554       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    18555     </ClCompile>
    18556     <ClCompile Include="..\bindings\js\JSReadableStreamControllerCustom.cpp">
    18557       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    18558       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    18559       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
    18560       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
    18561       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
    18562       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
    18563       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
    18564       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
    18565       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
    18566       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
    18567       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
    18568       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    18569     </ClCompile>
    18570     <ClCompile Include="..\bindings\js\JSReadableStreamReaderCustom.cpp">
    18571       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    18572       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    18573       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
    18574       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
    18575       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
    18576       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
    18577       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
    18578       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
    18579       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
    18580       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
    18581       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
    18582       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    18583     </ClCompile>
    18584     <ClCompile Include="..\bindings\js\ReadableJSStream.cpp">
     18526    <ClCompile Include="..\bindings\js\JSReadableStreamPrivateConstructors.cpp">
    1858518527      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    1858618528      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     
    2056220504    <ClInclude Include="..\Modules\notifications\WorkerGlobalScopeNotifications.h" />
    2056320505    <ClInclude Include="..\Modules\plugins\PluginReplacement.h" />
    20564     <ClInclude Include="..\Modules\streams\ReadableStream.h" />
    20565     <ClInclude Include="..\Modules\streams\ReadableStreamController.h" />
    20566     <ClInclude Include="..\Modules\streams\ReadableStreamReader.h" />
    2056720506    <ClInclude Include="..\Modules\webdatabase\AbstractDatabaseServer.h" />
    2056820507    <ClInclude Include="..\Modules\webdatabase\ChangeVersionData.h" />
     
    2246322402    <ClInclude Include="..\bindings\js\JSDictionary.h" />
    2246422403    <ClInclude Include="..\bindings\js\JSDOMBinding.h" />
     22404    <ClInclude Include="..\bindings\js\JSDOMConstructor.h" />
    2246522405    <ClInclude Include="..\bindings\js\JSDOMGlobalObject.h" />
    2246622406    <ClInclude Include="..\bindings\js\JSDOMGlobalObjectTask.h" />
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters

    r190527 r190608  
    1 <?xml version="1.0" encoding="utf-8"?>
    2 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     1<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    32  <ItemGroup>
    43    <Filter Include="DerivedSources">
     
    469468      <Filter>Modules\notifications</Filter>
    470469    </ClCompile>
    471     <ClCompile Include="..\Modules\streams\ReadableStream.cpp">
    472       <Filter>Modules\streams</Filter>
    473     </ClCompile>
    474     <ClCompile Include="..\Modules\streams\ReadableStreamReader.cpp">
    475       <Filter>Modules\streams</Filter>
    476     </ClCompile>
    477470    <ClCompile Include="..\Modules\webdatabase\ChangeVersionWrapper.cpp">
    478471      <Filter>Modules\webdatabase</Filter>
     
    44054398      <Filter>bindings\js</Filter>
    44064399    </ClCompile>
    4407     <ClCompile Include="..\bindings\js\JSReadableStreamCustom.cpp">
    4408       <Filter>bindings\js</Filter>
    4409     </ClCompile>
    4410     <ClCompile Include="..\bindings\js\JSReadableStreamControllerCustom.cpp">
    4411       <Filter>bindings\js</Filter>
    4412     </ClCompile>
    4413     <ClCompile Include="..\bindings\js\JSReadableStreamReaderCustom.cpp">
    4414       <Filter>bindings\js</Filter>
    4415     </ClCompile>
    4416     <ClCompile Include="..\bindings\js\ReadableJSStream.cpp">
     4400    <ClCompile Include="..\bindings\js\JSReadableStreamPrivateConstructors.cpp">
    44174401      <Filter>bindings\js</Filter>
    44184402    </ClCompile>
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r190401 r190608  
    636636                14DC0D3709FED073007B0235 /* JSNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DC0D3509FED073007B0235 /* JSNode.cpp */; };
    637637                14DC0D3809FED073007B0235 /* JSNode.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 14DC0D3609FED073007B0235 /* JSNode.h */; settings = {ATTRIBUTES = (); }; };
     638                14DCF3B21B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */; };
    638639                14DCF3B21B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DCF3B01B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.cpp */; };
     640                14DCF3B31B6BE2080062D4C2 /* JSCountQueuingStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */; };
    639641                14DCF3B31B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DCF3B11B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.h */; };
    640                 14DCF3B21B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */; };
    641                 14DCF3B31B6BE2080062D4C2 /* JSCountQueuingStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */; };
    642642                14E8378409F85D1C00B85AE4 /* JSEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */; };
    643643                14E8378E09F85D4F00B85AE4 /* JSEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E8378D09F85D4F00B85AE4 /* JSEvent.h */; };
     
    14861486                40ECAE8116B8B68A00C36103 /* JSDOMError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ECAE8016B8B68A00C36103 /* JSDOMError.cpp */; };
    14871487                410B7E721045FAB000D8224F /* JSMessageEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */; };
    1488                 41189EF91AD8273700B90A0D /* JSReadableStreamControllerCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41189EF81AD8233C00B90A0D /* JSReadableStreamControllerCustom.cpp */; };
    14891488                411A90421BBAB47A000CF156 /* WebCoreJSBuiltins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 411A90411BBAB46D000CF156 /* WebCoreJSBuiltins.cpp */; };
    14901489                4123081B138C429700BCCFCA /* WebCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93F19B1A08245E5A001E9ABC /* WebCore.framework */; };
    14911490                41230913138C42FF00BCCFCA /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8216299029F4FB501000131 /* JavaScriptCore.framework */; };
    14921491                4127D5370F8AAB1D00E424F5 /* ScriptState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4127D5360F8AAB1D00E424F5 /* ScriptState.cpp */; };
     1492                4129DF851BB5B80700322A16 /* JSReadableStreamPrivateConstructors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4129DF831BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.cpp */; };
     1493                4129DF861BB5B80C00322A16 /* JSReadableStreamPrivateConstructors.h in Headers */ = {isa = PBXBuildFile; fileRef = 4129DF841BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.h */; settings = {ATTRIBUTES = (Private, ); }; };
    14931494                4138D3351244054800323D33 /* EventContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4138D3331244054800323D33 /* EventContext.h */; };
    14941495                4138D3361244054800323D33 /* EventContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4138D3341244054800323D33 /* EventContext.cpp */; };
     1496                413C2C341BC29A8F0075204C /* JSDOMConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 413C2C331BC29A7B0075204C /* JSDOMConstructor.h */; settings = {ASSET_TAGS = (); }; };
    14951497                415071571685067300C3C7B3 /* SelectorFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 415071551685067300C3C7B3 /* SelectorFilter.cpp */; };
    14961498                415071581685067300C3C7B3 /* SelectorFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 415071561685067300C3C7B3 /* SelectorFilter.h */; };
     
    15221524                418F88040FF957AE0080F045 /* JSAbstractWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418F88020FF957AE0080F045 /* JSAbstractWorker.cpp */; };
    15231525                418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 418F88030FF957AE0080F045 /* JSAbstractWorker.h */; };
    1524                 4198BDF01A81142200B22FB5 /* ReadableJSStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4198BDEE1A81123600B22FB5 /* ReadableJSStream.cpp */; };
    1525                 4198BDF11A81143100B22FB5 /* ReadableJSStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4198BDEF1A81123600B22FB5 /* ReadableJSStream.h */; };
    15261526                419BC2DE1685329900D64D6D /* VisitedLinkState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 419BC2DC1685329900D64D6D /* VisitedLinkState.cpp */; };
    15271527                419BC2DF1685329900D64D6D /* VisitedLinkState.h in Headers */ = {isa = PBXBuildFile; fileRef = 419BC2DD1685329900D64D6D /* VisitedLinkState.h */; };
    1528                 419FAFAE1ABABD08005B828B /* ReadableStreamReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 419FAFAB1ABABCD5005B828B /* ReadableStreamReader.cpp */; };
    1529                 419FAFAF1ABABD0C005B828B /* ReadableStreamReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 419FAFAC1ABABCD5005B828B /* ReadableStreamReader.h */; };
    1530                 419FAFB11ABABDED005B828B /* JSReadableStreamReaderCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 419FAFB01ABABD7B005B828B /* JSReadableStreamReaderCustom.cpp */; };
    1531                 41A023EF1A39DB7A00F722CF /* ReadableStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41A023EB1A39DB7900F722CF /* ReadableStream.cpp */; };
    1532                 41A023F01A39DB7A00F722CF /* ReadableStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 41A023EC1A39DB7900F722CF /* ReadableStream.h */; };
    1533                 41A023F61A39DBCB00F722CF /* JSReadableStreamCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41A023F31A39DBCB00F722CF /* JSReadableStreamCustom.cpp */; };
    15341528                41A3D58E101C152D00316D07 /* DedicatedWorkerThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41A3D58C101C152D00316D07 /* DedicatedWorkerThread.cpp */; };
    15351529                41A3D58F101C152D00316D07 /* DedicatedWorkerThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 41A3D58D101C152D00316D07 /* DedicatedWorkerThread.h */; };
     
    78417835                148AFDA30AF58360008CC700 /* ExceptionHandlers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ExceptionHandlers.h; sourceTree = "<group>"; };
    78427836                148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ExceptionHandlers.mm; sourceTree = "<group>"; };
     7837                148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CountQueuingStrategy.idl; sourceTree = "<group>"; };
    78437838                148B4FFF1B6904C500C954E5 /* ByteLengthQueuingStrategy.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ByteLengthQueuingStrategy.idl; sourceTree = "<group>"; };
    7844                 148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CountQueuingStrategy.idl; sourceTree = "<group>"; };
    78457839                14947FFB12F80CD200A0F631 /* DocumentOrderedMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentOrderedMap.cpp; sourceTree = "<group>"; };
    78467840                14947FFC12F80CD200A0F631 /* DocumentOrderedMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentOrderedMap.h; sourceTree = "<group>"; };
     
    78657859                14DC0D3509FED073007B0235 /* JSNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNode.cpp; sourceTree = "<group>"; };
    78667860                14DC0D3609FED073007B0235 /* JSNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNode.h; sourceTree = "<group>"; };
     7861                14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCountQueuingStrategy.cpp; sourceTree = "<group>"; };
    78677862                14DCF3B01B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSByteLengthQueuingStrategy.cpp; sourceTree = "<group>"; };
     7863                14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCountQueuingStrategy.h; sourceTree = "<group>"; };
    78687864                14DCF3B11B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSByteLengthQueuingStrategy.h; sourceTree = "<group>"; };
    7869                 14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCountQueuingStrategy.cpp; sourceTree = "<group>"; };
    7870                 14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCountQueuingStrategy.h; sourceTree = "<group>"; };
    78717865                14E836D209F8512000B85AE4 /* Event.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Event.idl; sourceTree = "<group>"; };
    78727866                14E8378309F85D1C00B85AE4 /* JSEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSEvent.cpp; sourceTree = "<group>"; };
     
    87698763                40ECAE8016B8B68A00C36103 /* JSDOMError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMError.cpp; sourceTree = "<group>"; };
    87708764                410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMessageEventCustom.cpp; sourceTree = "<group>"; };
    8771                 41189EF61AD8232800B90A0D /* ReadableStreamController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamController.h; sourceTree = "<group>"; };
    87728765                41189EF71AD8232800B90A0D /* ReadableStreamController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamController.idl; sourceTree = "<group>"; };
    8773                 41189EF81AD8233C00B90A0D /* JSReadableStreamControllerCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamControllerCustom.cpp; sourceTree = "<group>"; };
    87748766                411A90411BBAB46D000CF156 /* WebCoreJSBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreJSBuiltins.cpp; sourceTree = "<group>"; };
    87758767                4127D5360F8AAB1D00E424F5 /* ScriptState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptState.cpp; sourceTree = "<group>"; };
     8768                4129DF811BB5B79B00322A16 /* ReadableStreamController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamController.h; sourceTree = "<group>"; };
     8769                4129DF821BB5B7A600322A16 /* ReadableStreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamReader.h; sourceTree = "<group>"; };
     8770                4129DF831BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamPrivateConstructors.cpp; sourceTree = "<group>"; };
     8771                4129DF841BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStreamPrivateConstructors.h; sourceTree = "<group>"; };
    87768772                4138D3331244054800323D33 /* EventContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventContext.h; sourceTree = "<group>"; };
    87778773                4138D3341244054800323D33 /* EventContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventContext.cpp; sourceTree = "<group>"; };
     8774                413C2C331BC29A7B0075204C /* JSDOMConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConstructor.h; sourceTree = "<group>"; };
    87788775                415071551685067300C3C7B3 /* SelectorFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectorFilter.cpp; sourceTree = "<group>"; };
    87798776                415071561685067300C3C7B3 /* SelectorFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectorFilter.h; sourceTree = "<group>"; };
     
    88068803                418F88020FF957AE0080F045 /* JSAbstractWorker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAbstractWorker.cpp; sourceTree = "<group>"; };
    88078804                418F88030FF957AE0080F045 /* JSAbstractWorker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAbstractWorker.h; sourceTree = "<group>"; };
    8808                 4198BDEE1A81123600B22FB5 /* ReadableJSStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableJSStream.cpp; sourceTree = "<group>"; };
    8809                 4198BDEF1A81123600B22FB5 /* ReadableJSStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableJSStream.h; sourceTree = "<group>"; };
    88108805                419BC2DC1685329900D64D6D /* VisitedLinkState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisitedLinkState.cpp; sourceTree = "<group>"; };
    88118806                419BC2DD1685329900D64D6D /* VisitedLinkState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisitedLinkState.h; sourceTree = "<group>"; };
    8812                 419FAFAB1ABABCD5005B828B /* ReadableStreamReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStreamReader.cpp; sourceTree = "<group>"; };
    8813                 419FAFAC1ABABCD5005B828B /* ReadableStreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamReader.h; sourceTree = "<group>"; };
    88148807                419FAFAD1ABABCD5005B828B /* ReadableStreamReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamReader.idl; sourceTree = "<group>"; };
    8815                 419FAFB01ABABD7B005B828B /* JSReadableStreamReaderCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamReaderCustom.cpp; sourceTree = "<group>"; };
    8816                 41A023EB1A39DB7900F722CF /* ReadableStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStream.cpp; sourceTree = "<group>"; };
    8817                 41A023EC1A39DB7900F722CF /* ReadableStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStream.h; sourceTree = "<group>"; };
    88188808                41A023ED1A39DB7900F722CF /* ReadableStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStream.idl; sourceTree = "<group>"; };
    8819                 41A023F31A39DBCB00F722CF /* JSReadableStreamCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamCustom.cpp; sourceTree = "<group>"; };
    88208809                41A3D58C101C152D00316D07 /* DedicatedWorkerThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DedicatedWorkerThread.cpp; sourceTree = "<group>"; };
    88218810                41A3D58D101C152D00316D07 /* DedicatedWorkerThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DedicatedWorkerThread.h; sourceTree = "<group>"; };
     
    1627816267                        children = (
    1627916268                                148B4FFF1B6904C500C954E5 /* ByteLengthQueuingStrategy.idl */,
     16269                                4129DF821BB5B7A600322A16 /* ReadableStreamReader.h */,
     16270                                4129DF811BB5B79B00322A16 /* ReadableStreamController.h */,
    1628016271                                148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */,
    16281                                 41A023EB1A39DB7900F722CF /* ReadableStream.cpp */,
    16282                                 41A023EC1A39DB7900F722CF /* ReadableStream.h */,
    1628316272                                41A023ED1A39DB7900F722CF /* ReadableStream.idl */,
    16284                                 41189EF61AD8232800B90A0D /* ReadableStreamController.h */,
    1628516273                                41189EF71AD8232800B90A0D /* ReadableStreamController.idl */,
    16286                                 419FAFAB1ABABCD5005B828B /* ReadableStreamReader.cpp */,
    16287                                 419FAFAC1ABABCD5005B828B /* ReadableStreamReader.h */,
    1628816274                                419FAFAD1ABABCD5005B828B /* ReadableStreamReader.idl */,
    1628916275                        );
     
    2162921615                                93B70D4709EB0C7C009D8468 /* JSDOMBinding.cpp */,
    2163021616                                93B70D4809EB0C7C009D8468 /* JSDOMBinding.h */,
     21617                                413C2C331BC29A7B0075204C /* JSDOMConstructor.h */,
    2163121618                                E1C36CBC0EB08062007410BC /* JSDOMGlobalObject.cpp */,
    2163221619                                E1C36C020EB076D6007410BC /* JSDOMGlobalObject.h */,
     
    2165721644                                93B70D4F09EB0C7C009D8468 /* JSPluginElementFunctions.cpp */,
    2165821645                                93B70D5009EB0C7C009D8468 /* JSPluginElementFunctions.h */,
    21659                                 41189EF81AD8233C00B90A0D /* JSReadableStreamControllerCustom.cpp */,
     21646                                4129DF831BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.cpp */,
     21647                                4129DF841BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.h */,
    2166021648                                E1C36D320EB0A094007410BC /* JSWorkerGlobalScopeBase.cpp */,
    2166121649                                E1C36D330EB0A094007410BC /* JSWorkerGlobalScopeBase.h */,
    2166221650                                E38838941BAD145F00D62EE3 /* JSModuleLoader.cpp */,
    2166321651                                E38838951BAD145F00D62EE3 /* JSModuleLoader.h */,
    21664                                 4198BDEE1A81123600B22FB5 /* ReadableJSStream.cpp */,
    21665                                 4198BDEF1A81123600B22FB5 /* ReadableJSStream.h */,
    2166621652                                BCA378BA0D15F64200B793D6 /* ScheduledAction.cpp */,
    2166721653                                BCA378BB0D15F64200B793D6 /* ScheduledAction.h */,
     
    2183221818                                FD8AA63D169514A700D2EA68 /* JSPannerNodeCustom.cpp */,
    2183321819                                A85F22081430377D007CC884 /* JSPopStateEventCustom.cpp */,
    21834                                 41A023F31A39DBCB00F722CF /* JSReadableStreamCustom.cpp */,
    21835                                 419FAFB01ABABD7B005B828B /* JSReadableStreamReaderCustom.cpp */,
    2183621820                                4AE0BF881836083100F3852D /* JSRTCIceCandidateCustom.cpp */,
    2183721821                                07CA120D182D67D800D12197 /* JSRTCPeerConnectionCustom.cpp */,
     
    2601225996                                B2FA3D510AB75A6F000E5AC4 /* JSSVGAnimatedTransformList.h in Headers */,
    2601325997                                B2FA3D530AB75A6F000E5AC4 /* JSSVGAnimateElement.h in Headers */,
     25998                                413C2C341BC29A8F0075204C /* JSDOMConstructor.h in Headers */,
    2601425999                                4496E39E1398136C003EE32A /* JSSVGAnimateMotionElement.h in Headers */,
    2601526000                                B2FA3D550AB75A6F000E5AC4 /* JSSVGAnimateTransformElement.h in Headers */,
     
    2641726402                                CDF2B0111820540600F2B424 /* MockBox.h in Headers */,
    2641826403                                CDF2B0131820540600F2B424 /* MockMediaPlayerMediaSource.h in Headers */,
     26404                                4129DF861BB5B80C00322A16 /* JSReadableStreamPrivateConstructors.h in Headers */,
    2641926405                                CDF2B0151820540600F2B424 /* MockMediaSourcePrivate.h in Headers */,
    2642026406                                4A0FFA9E1AAF5E7E0062803B /* MockRealtimeMediaSourceCenter.h in Headers */,
     
    2668426670                                6E84E9E117668BF100815B68 /* RasterShape.h in Headers */,
    2668526671                                A84D827C11D333ED00972990 /* RawDataDocumentParser.h in Headers */,
    26686                                 4198BDF11A81143100B22FB5 /* ReadableJSStream.h in Headers */,
    26687                                 41A023F01A39DB7A00F722CF /* ReadableStream.h in Headers */,
    26688                                 419FAFAF1ABABD0C005B828B /* ReadableStreamReader.h in Headers */,
    2668926672                                FD31603C12B0267600C1A359 /* RealtimeAnalyser.h in Headers */,
    2669026673                                4A4F65711AA997F100E38CDD /* RealtimeMediaSource.h in Headers */,
     
    2959329576                                7C4C96DC1AD4483500365A50 /* JSReadableStream.cpp in Sources */,
    2959429577                                6C4C96DE1AD4483500365A50 /* JSReadableStreamController.cpp in Sources */,
    29595                                 41189EF91AD8273700B90A0D /* JSReadableStreamControllerCustom.cpp in Sources */,
    29596                                 41A023F61A39DBCB00F722CF /* JSReadableStreamCustom.cpp in Sources */,
    2959729578                                7C4C96DE1AD4483500365A50 /* JSReadableStreamReader.cpp in Sources */,
    29598                                 419FAFB11ABABDED005B828B /* JSReadableStreamReaderCustom.cpp in Sources */,
    2959929579                                BCFE2F110C1B58370020235F /* JSRect.cpp in Sources */,
    2960029580                                4998AECD13F9D6C90090B1AA /* JSRequestAnimationFrameCallback.cpp in Sources */,
     
    3010730087                                BCEF43E00E674110001C1287 /* NinePieceImage.cpp in Sources */,
    3010830088                                A8C4A80009D563270003AC8D /* Node.cpp in Sources */,
     30089                                4129DF851BB5B80700322A16 /* JSReadableStreamPrivateConstructors.cpp in Sources */,
    3010930090                                854FE7320A2297BE0058D7AD /* NodeFilterCondition.cpp in Sources */,
    3011030091                                854FE7340A2297BE0058D7AD /* NodeIterator.cpp in Sources */,
     
    3024930230                                F55B3DCD1251F12D003EF269 /* RangeInputType.cpp in Sources */,
    3025030231                                6E84E9E017668BEE00815B68 /* RasterShape.cpp in Sources */,
    30251                                 4198BDF01A81142200B22FB5 /* ReadableJSStream.cpp in Sources */,
    30252                                 41A023EF1A39DB7A00F722CF /* ReadableStream.cpp in Sources */,
    30253                                 419FAFAE1ABABD08005B828B /* ReadableStreamReader.cpp in Sources */,
    3025430232                                FD31603B12B0267600C1A359 /* RealtimeAnalyser.cpp in Sources */,
    3025530233                                4A4F65701AA997F100E38CDD /* RealtimeMediaSource.cpp in Sources */,
  • trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp

    r190272 r190608  
    118118#include "JSPluginElementFunctions.cpp"
    119119#include "JSPopStateEventCustom.cpp"
    120 #if ENABLE(STREAMS_API)
    121 #include "JSReadableStreamControllerCustom.cpp"
    122 #include "JSReadableStreamCustom.cpp"
    123 #include "JSReadableStreamReaderCustom.cpp"
    124 #include "ReadableJSStream.cpp"
    125 #endif
     120#include "JSReadableStreamPrivateConstructors.cpp"
    126121#include "JSSQLResultSetRowListCustom.cpp"
    127122#include "JSSQLTransactionCustom.cpp"
  • trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp

    r190401 r190608  
    4949
    5050#if ENABLE(STREAMS_API)
     51#include "JSReadableStreamPrivateConstructors.h"
    5152#include "ReadableStreamInternalsBuiltins.h"
    5253#endif
     
    8990        GlobalPropertyInfo(vm.propertyNames->window, m_shell, DontDelete | ReadOnly),
    9091#if ENABLE(STREAMS_API)
     92        GlobalPropertyInfo(static_cast<WebCoreJSClientData*>(vm.clientData)->builtinNames().readableStreamClosedPrivateName(), jsNumber(1), DontDelete | ReadOnly),
     93        GlobalPropertyInfo(static_cast<WebCoreJSClientData*>(vm.clientData)->builtinNames().readableStreamErroredPrivateName(), jsNumber(2), DontDelete | ReadOnly),
     94        GlobalPropertyInfo(static_cast<WebCoreJSClientData*>(vm.clientData)->builtinNames().readableStreamReadablePrivateName(), jsNumber(3), DontDelete | ReadOnly),
     95        GlobalPropertyInfo(static_cast<WebCoreJSClientData*>(vm.clientData)->builtinNames().ReadableStreamControllerPrivateName(), createReadableStreamControllerPrivateConstructor(vm, *this), DontDelete | ReadOnly),
     96        GlobalPropertyInfo(static_cast<WebCoreJSClientData*>(vm.clientData)->builtinNames().ReadableStreamReaderPrivateName(), createReadableStreamReaderPrivateConstructor(vm, *this), DontDelete | ReadOnly),
    9197#define DECLARE_GLOBAL_STATIC(name)\
    9298        GlobalPropertyInfo(\
  • trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp

    r190401 r190608  
    3030#include "CountQueuingStrategyBuiltins.cpp"
    3131#include "ReadableStreamBuiltins.cpp"
     32#include "ReadableStreamControllerBuiltins.cpp"
    3233#include "ReadableStreamInternalsBuiltins.cpp"
     34#include "ReadableStreamReaderBuiltins.cpp"
    3335#endif
  • trunk/Source/WebCore/bindings/js/WebCoreJSClientData.h

    r190401 r190608  
    2424
    2525#include "DOMWrapperWorld.h"
     26#include "WebCoreBuiltinNames.h"
    2627#include "WebCoreTypedArrayController.h"
    2728#include <wtf/HashSet.h>
     
    3233#include "CountQueuingStrategyBuiltinsWrapper.h"
    3334#include "ReadableStreamBuiltinsWrapper.h"
     35#include "ReadableStreamControllerBuiltinsWrapper.h"
    3436#include "ReadableStreamInternalsBuiltinsWrapper.h"
     37#include "ReadableStreamReaderBuiltinsWrapper.h"
    3538#endif
    3639
     
    4346
    4447public:
     48    explicit WebCoreJSClientData(JSC::VM& vm)
     49        : m_builtinNames(&vm)
    4550#if ENABLE(STREAMS_API)
    46     explicit WebCoreJSClientData(JSC::VM& vm)
    47         : m_readableStreamBuiltins(&vm)
     51        , m_readableStreamBuiltins(&vm)
     52        , m_readableStreamControllerBuiltins(&vm)
    4853        , m_readableStreamInternalsBuiltins(&vm)
     54        , m_readableStreamReaderBuiltins(&vm)
    4955        , m_byteLengthQueuingStrategyBuiltins(&vm)
    5056        , m_countQueuingStrategyBuiltins(&vm)
    51 #else
    52     WebCoreJSClientData(JSC::VM&)
    5357#endif
    5458    {
     
    9094    }
    9195
     96    WebCoreBuiltinNames& builtinNames() { return m_builtinNames; }
     97
    9298#if ENABLE(STREAMS_API)
    9399    ReadableStreamBuiltinsWrapper& readableStreamBuiltins() { return m_readableStreamBuiltins; }
     100    ReadableStreamControllerBuiltinsWrapper& readableStreamControllerBuiltins() { return m_readableStreamControllerBuiltins; }
    94101    ReadableStreamInternalsBuiltinsWrapper& readableStreamInternalsBuiltins() { return m_readableStreamInternalsBuiltins; }
     102    ReadableStreamReaderBuiltinsWrapper& readableStreamReaderBuiltins() { return m_readableStreamReaderBuiltins; }
    95103    ByteLengthQueuingStrategyBuiltinsWrapper& byteLengthQueuingStrategyBuiltins() { return m_byteLengthQueuingStrategyBuiltins; }
    96104    CountQueuingStrategyBuiltinsWrapper& countQueuingStrategyBuiltins() { return m_countQueuingStrategyBuiltins; }
     
    101109    RefPtr<DOMWrapperWorld> m_normalWorld;
    102110
     111    WebCoreBuiltinNames m_builtinNames;
     112
    103113#if ENABLE(STREAMS_API)
    104114    ReadableStreamBuiltinsWrapper m_readableStreamBuiltins;
     115    ReadableStreamControllerBuiltinsWrapper m_readableStreamControllerBuiltins;
    105116    ReadableStreamInternalsBuiltinsWrapper m_readableStreamInternalsBuiltins;
     117    ReadableStreamReaderBuiltinsWrapper m_readableStreamReaderBuiltins;
    106118    ByteLengthQueuingStrategyBuiltinsWrapper m_byteLengthQueuingStrategyBuiltins;
    107119    CountQueuingStrategyBuiltinsWrapper m_countQueuingStrategyBuiltins;
Note: See TracChangeset for help on using the changeset viewer.