[Streams API] Replace ReadableStreamReader by ReadableStreamDefaultReader
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jul 2016 10:40:17 +0000 (10:40 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jul 2016 10:40:17 +0000 (10:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=160194

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-07-27
Reviewed by Youenn Fablet.

Replaced ReadableStreamReader by ReadableStreamDefaultReader to align
with updated Streams API specification.

No change in functionality.

Source/WebCore:

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* Modules/fetch/FetchInternals.js:
(consumeStream):
* Modules/fetch/FetchResponse.js:
(body):
* Modules/streams/ReadableStream.js:
(getReader):
* Modules/streams/ReadableStreamDefaultReader.idl: Renamed from Source/WebCore/Modules/streams/ReadableStreamReader.idl.
* Modules/streams/ReadableStreamDefaultReader.js: Renamed from Source/WebCore/Modules/streams/ReadableStreamReader.js.
(cancel):
(read):
(releaseLock):
(closed):
* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamDefaultReader):
(teeReadableStream):
(teeReadableStreamPullFunction):
(isReadableStreamDefaultReader):
(closeReadableStream):
(readFromReadableStreamDefaultReader):
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::addBuiltinGlobals):
(WebCore::JSDOMGlobalObject::finishCreation):
* bindings/js/JSReadableStreamPrivateConstructors.cpp:
(WebCore::constructJSReadableStreamDefaultReader):
(WebCore::JSBuiltinReadableStreamDefaultReaderPrivateConstructor::initializeExecutable):
(WebCore::createReadableStreamDefaultReaderPrivateConstructor):
* bindings/js/JSReadableStreamPrivateConstructors.h:
* bindings/js/WebCoreBuiltinNames.h:
* features.json:

LayoutTests:

* streams/brand-checks.html:
* streams/readable-stream-controller-error-expected.txt:
* streams/readable-stream-controller-error.html:
* streams/readable-stream-default-reader-read-expected.txt: Renamed from LayoutTests/streams/readable-stream-reader-read-expected.txt.
* streams/readable-stream-default-reader-read.html: Renamed from LayoutTests/streams/readable-stream-reader-read.html.
* streams/readable-stream-error-messages-expected.txt:
* streams/readable-stream-error-messages.html:
* streams/reference-implementation/readable-stream-reader-expected.txt:
* streams/shadowing-Promise-expected.txt:
* streams/shadowing-Promise.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203772 268f45cc-cd09-0410-ab3c-d52691b4dbfc

27 files changed:
LayoutTests/ChangeLog
LayoutTests/streams/brand-checks.html
LayoutTests/streams/readable-stream-controller-error-expected.txt
LayoutTests/streams/readable-stream-controller-error.html
LayoutTests/streams/readable-stream-default-reader-read-expected.txt [moved from LayoutTests/streams/readable-stream-reader-read-expected.txt with 100% similarity]
LayoutTests/streams/readable-stream-default-reader-read.html [moved from LayoutTests/streams/readable-stream-reader-read.html with 100% similarity]
LayoutTests/streams/readable-stream-error-messages-expected.txt
LayoutTests/streams/readable-stream-error-messages.html
LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt
LayoutTests/streams/shadowing-Promise-expected.txt
LayoutTests/streams/shadowing-Promise.html
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/fetch/FetchInternals.js
Source/WebCore/Modules/fetch/FetchResponse.js
Source/WebCore/Modules/streams/ReadableStream.js
Source/WebCore/Modules/streams/ReadableStreamDefaultReader.idl [moved from Source/WebCore/Modules/streams/ReadableStreamReader.idl with 97% similarity]
Source/WebCore/Modules/streams/ReadableStreamDefaultReader.js [moved from Source/WebCore/Modules/streams/ReadableStreamReader.js with 75% similarity]
Source/WebCore/Modules/streams/ReadableStreamInternals.js
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp
Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.h
Source/WebCore/bindings/js/WebCoreBuiltinNames.h
Source/WebCore/features.json

index 357cd29..298959e 100644 (file)
@@ -1,3 +1,26 @@
+2016-07-27  Romain Bellessort  <romain.bellessort@crf.canon.fr>
+
+        [Streams API] Replace ReadableStreamReader by ReadableStreamDefaultReader
+        https://bugs.webkit.org/show_bug.cgi?id=160194
+
+        Reviewed by Youenn Fablet.
+
+        Replaced ReadableStreamReader by ReadableStreamDefaultReader to align
+        with updated Streams API specification.
+
+        No change in functionality.
+
+        * streams/brand-checks.html:
+        * streams/readable-stream-controller-error-expected.txt:
+        * streams/readable-stream-controller-error.html:
+        * streams/readable-stream-default-reader-read-expected.txt: Renamed from LayoutTests/streams/readable-stream-reader-read-expected.txt.
+        * streams/readable-stream-default-reader-read.html: Renamed from LayoutTests/streams/readable-stream-reader-read.html.
+        * streams/readable-stream-error-messages-expected.txt:
+        * streams/readable-stream-error-messages.html:
+        * streams/reference-implementation/readable-stream-reader-expected.txt:
+        * streams/shadowing-Promise-expected.txt:
+        * streams/shadowing-Promise.html:
+
 2016-07-27  Javier Fernandez  <jfernandez@igalia.com>
 
         [css-grid] Handle alignment with orthogonal flows
index 4bae353..6b2289b 100644 (file)
@@ -5,7 +5,7 @@
 <script>
 // This is updated till https://github.com/whatwg/streams/commit/4ba861e6f60c248060811830e11271c84b439cc3
 
-let ReadableStreamReader = (new ReadableStream()).getReader().constructor;
+let ReadableStreamDefaultReader = (new ReadableStream()).getReader().constructor;
 
 function fakeWritableStream() {
   return {
@@ -25,7 +25,7 @@ function realReadableStream() {
 function fakeReadableStream() {
     return {
         cancel: function(reason) { return Promise.resolve(); },
-        getReader: function() { return new ReadableStreamReader(new ReadableStream()); },
+        getReader: function() { return new ReadableStreamDefaultReader(new ReadableStream()); },
         pipeThrough: function(obj, options) { return obj.readable; },
         pipeTo: function() { return Promise.resolve(); },
         tee: function() { return [realReadableStream(), realReadableStream()]; }
index 42eb302..d2a75e9 100644 (file)
@@ -1,4 +1,4 @@
 
-PASS Erroring a ReadableStream after checking closed should reject ReadableStreamReader closed promise 
-PASS Erroring a ReadableStream before checking closed should reject ReadableStreamReader closed promise 
+PASS Erroring a ReadableStream after checking closed should reject ReadableStreamDefaultReader closed promise 
+PASS Erroring a ReadableStream before checking closed should reject ReadableStreamDefaultReader closed promise 
 
index 00f6177..26a636d 100644 (file)
@@ -4,7 +4,7 @@
 <script>
 // This is updated till https://github.com/whatwg/streams/commit/4ba861e6f60c248060811830e11271c84b439cc3
 
-var test1 = async_test('Erroring a ReadableStream after checking closed should reject ReadableStreamReader closed promise');
+var test1 = async_test('Erroring a ReadableStream after checking closed should reject ReadableStreamDefaultReader closed promise');
 test1.step(function() {
     var controller;
     var rs = new ReadableStream({
@@ -24,7 +24,7 @@ test1.step(function() {
     controller.error(rsError);
 });
 
-var test2 = async_test('Erroring a ReadableStream before checking closed should reject ReadableStreamReader closed promise');
+var test2 = async_test('Erroring a ReadableStream before checking closed should reject ReadableStreamDefaultReader closed promise');
 test2.step(function() {
     var controller;
     var rs = new ReadableStream({
index 9a7750c..9713968 100644 (file)
@@ -5,11 +5,11 @@ CONSOLE MESSAGE: line 11: TypeError: Can only call ReadableStreamController.enqu
 CONSOLE MESSAGE: line 11: TypeError: Can only call ReadableStreamController.error on instances of ReadableStreamController
 CONSOLE MESSAGE: line 11: TypeError: Can only call ReadableStreamController.close on instances of ReadableStreamController
 CONSOLE MESSAGE: line 11: TypeError: The ReadableStreamController.desiredSize getter can only be used on instances of ReadableStreamController
-CONSOLE MESSAGE: line 11: TypeError: Can only call ReadableStreamReader.releaseLock on instances of ReadableStreamReader
+CONSOLE MESSAGE: line 11: TypeError: Can only call ReadableStreamDefaultReader.releaseLock on instances of ReadableStreamDefaultReader
 CONSOLE MESSAGE: line 18: TypeError: Can only call ReadableStream.cancel on instances of ReadableStream
-CONSOLE MESSAGE: line 18: TypeError: Can only call ReadableStreamReader.cancel on instances of ReadableStreamReader
-CONSOLE MESSAGE: line 18: TypeError: Can only call ReadableStreamReader.read on instances of ReadableStreamReader
-CONSOLE MESSAGE: line 18: TypeError: The ReadableStreamReader.closed getter can only be used on instances of ReadableStreamReader
+CONSOLE MESSAGE: line 18: TypeError: Can only call ReadableStreamDefaultReader.cancel on instances of ReadableStreamDefaultReader
+CONSOLE MESSAGE: line 18: TypeError: Can only call ReadableStreamDefaultReader.read on instances of ReadableStreamDefaultReader
+CONSOLE MESSAGE: line 18: TypeError: The ReadableStreamDefaultReader.closed getter can only be used on instances of ReadableStreamDefaultReader
 
-PASS Exercising TypeError messages in ReadableStream, ReadableStreamController and ReadableStreamReader 
+PASS Exercising TypeError messages in ReadableStream, ReadableStreamController and ReadableStreamDefaultReader 
 
index 7c584b2..b471337 100644 (file)
@@ -59,5 +59,5 @@ promise_test(function(test) {
     results.push(printPromiseGetterError(reader, "closed", stream));
 
     return Promise.all(results);
-}, "Exercising TypeError messages in ReadableStream, ReadableStreamController and ReadableStreamReader");
+}, "Exercising TypeError messages in ReadableStream, ReadableStreamController and ReadableStreamDefaultReader");
 </script>
index 08fe27b..8746636 100644 (file)
@@ -1,14 +1,14 @@
 
-PASS Can get the ReadableStreamReader constructor indirectly 
-PASS ReadableStreamReader constructor should get a ReadableStream object as argument 
-FAIL ReadableStreamReader instances should have the correct list of properties assert_equals: method should be non-enumerable expected false but got true
-PASS ReadableStreamReader closed should always return the same promise object 
-PASS Constructing a ReadableStreamReader directly should fail if the stream is already locked (via direct construction) 
-PASS Getting a ReadableStreamReader via getReader should fail if the stream is already locked (via direct construction) 
-PASS Constructing a ReadableStreamReader directly should fail if the stream is already locked (via getReader) 
-PASS Getting a ReadableStreamReader via getReader should fail if the stream is already locked (via getReader) 
-PASS Constructing a ReadableStreamReader directly should be OK if the stream is closed 
-PASS Constructing a ReadableStreamReader directly should be OK if the stream is errored 
+PASS Can get the ReadableStreamDefaultReader constructor indirectly 
+PASS ReadableStreamDefaultReader constructor should get a ReadableStream object as argument 
+FAIL ReadableStreamDefaultReader instances should have the correct list of properties assert_equals: method should be non-enumerable expected false but got true
+PASS ReadableStreamDefaultReader closed should always return the same promise object 
+PASS Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via direct construction) 
+PASS Getting a ReadableStreamDefaultReader via getReader should fail if the stream is already locked (via direct construction) 
+PASS Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via getReader) 
+PASS Getting a ReadableStreamDefaultReader via getReader should fail if the stream is already locked (via getReader) 
+PASS Constructing a ReadableStreamDefaultReader directly should be OK if the stream is closed 
+PASS Constructing a ReadableStreamDefaultReader directly should be OK if the stream is errored 
 PASS Reading from a reader for an empty stream will wait until a chunk is available 
 PASS cancel() on a reader does not release the reader 
 PASS closed should be fulfilled after stream is closed (.closed access before acquiring) 
@@ -17,6 +17,6 @@ PASS Multiple readers can access the stream in sequence
 PASS Cannot use an already-released reader to unlock a stream again 
 PASS cancel() on a released reader is a no-op and does not pass through 
 PASS Getting a second reader after erroring the stream should succeed 
-PASS Garbage-collecting a ReadableStreamReader should not unlock its stream 
-PASS ReadableStreamReader closed promise should be rejected with undefined if that is the error 
+PASS Garbage-collecting a ReadableStreamDefaultReader should not unlock its stream 
+PASS ReadableStreamDefaultReader closed promise should be rejected with undefined if that is the error 
 
index 60179e6..3738a51 100644 (file)
@@ -8,6 +8,6 @@ PASS Streams and promises: replace catch method in Promise prototype
 PASS Streams and promises: replace then method in promise object 
 PASS Streams should not directly use Number and related methods 
 PASS Streams should not directly use ReadableStream public APIs 
-PASS Streams should not directly use ReadableStreamReader read public API 
+PASS Streams should not directly use ReadableStreamDefaultReader read public API 
 PASS Streams should not directly use array public APIs 
 
index 33e0fd1..d82fe46 100644 (file)
@@ -127,15 +127,15 @@ test(function() {
 }, 'Streams should not directly use ReadableStream public APIs');
 
 promise_test(function() {
-    const ReadableStreamReader = new ReadableStream().getReader().constructor;
-    const ReadableStreamReaderReadBackup = ReadableStreamReader.prototype.read;
+    const ReadableStreamDefaultReader = new ReadableStream().getReader().constructor;
+    const ReadableStreamDefaultReaderReadBackup = ReadableStreamDefaultReader.prototype.read;
 
     function cleanTest() {
-        ReadableStreamReader.prototype.read = ReadableStreamReaderReadBackup;
+        ReadableStreamDefaultReader.prototype.read = ReadableStreamDefaultReaderReadBackup;
     }
 
     try {
-        ReadableStreamReader.prototype.read = function() { assert_unreached("streams should not use this ReadableStreamReader.read method"); };
+        ReadableStreamDefaultReader.prototype.read = function() { assert_unreached("streams should not use this ReadableStreamDefaultReader.read method"); };
 
         [s1, s2] = new ReadableStream({
             start: function(controller) {
@@ -148,7 +148,7 @@ promise_test(function() {
         cleanTest();
         assert_unreached("test should not throw");
     }
-}, 'Streams should not directly use ReadableStreamReader read public API');
+}, 'Streams should not directly use ReadableStreamDefaultReader read public API');
 
 promise_test(function() {
     const ArrayPushBackup = Array.prototype.push;
index 62a7232..e693721 100644 (file)
@@ -263,7 +263,7 @@ set(WebCore_NON_SVG_IDL_FILES
     Modules/streams/CountQueuingStrategy.idl
     Modules/streams/ReadableStream.idl
     Modules/streams/ReadableStreamController.idl
-    Modules/streams/ReadableStreamReader.idl
+    Modules/streams/ReadableStreamDefaultReader.idl
     Modules/streams/ReadableStreamSource.idl
     Modules/streams/WritableStream.idl
 
@@ -3728,7 +3728,7 @@ set(WebCore_BUILTINS_SOURCES
     ${WEBCORE_DIR}/Modules/streams/ReadableStream.js
     ${WEBCORE_DIR}/Modules/streams/ReadableStreamController.js
     ${WEBCORE_DIR}/Modules/streams/ReadableStreamInternals.js
-    ${WEBCORE_DIR}/Modules/streams/ReadableStreamReader.js
+    ${WEBCORE_DIR}/Modules/streams/ReadableStreamDefaultReader.js
     ${WEBCORE_DIR}/Modules/streams/StreamInternals.js
     ${WEBCORE_DIR}/Modules/streams/WritableStream.js
     ${WEBCORE_DIR}/Modules/streams/WritableStreamInternals.js
index a8a6698..7c1ebc1 100644 (file)
@@ -1,3 +1,49 @@
+2016-07-27  Romain Bellessort  <romain.bellessort@crf.canon.fr>
+
+        [Streams API] Replace ReadableStreamReader by ReadableStreamDefaultReader
+        https://bugs.webkit.org/show_bug.cgi?id=160194
+
+        Reviewed by Youenn Fablet.
+
+        Replaced ReadableStreamReader by ReadableStreamDefaultReader to align
+        with updated Streams API specification.
+
+        No change in functionality.
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * Modules/fetch/FetchInternals.js:
+        (consumeStream):
+        * Modules/fetch/FetchResponse.js:
+        (body):
+        * Modules/streams/ReadableStream.js:
+        (getReader):
+        * Modules/streams/ReadableStreamDefaultReader.idl: Renamed from Source/WebCore/Modules/streams/ReadableStreamReader.idl.
+        * Modules/streams/ReadableStreamDefaultReader.js: Renamed from Source/WebCore/Modules/streams/ReadableStreamReader.js.
+        (cancel):
+        (read):
+        (releaseLock):
+        (closed):
+        * Modules/streams/ReadableStreamInternals.js:
+        (privateInitializeReadableStreamDefaultReader):
+        (teeReadableStream):
+        (teeReadableStreamPullFunction):
+        (isReadableStreamDefaultReader):
+        (closeReadableStream):
+        (readFromReadableStreamDefaultReader):
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSDOMGlobalObject.cpp:
+        (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
+        (WebCore::JSDOMGlobalObject::finishCreation):
+        * bindings/js/JSReadableStreamPrivateConstructors.cpp:
+        (WebCore::constructJSReadableStreamDefaultReader):
+        (WebCore::JSBuiltinReadableStreamDefaultReaderPrivateConstructor::initializeExecutable):
+        (WebCore::createReadableStreamDefaultReaderPrivateConstructor):
+        * bindings/js/JSReadableStreamPrivateConstructors.h:
+        * bindings/js/WebCoreBuiltinNames.h:
+        * features.json:
+
 2016-07-27  Javier Fernandez  <jfernandez@igalia.com>
 
         [css-grid] Handle alignment with orthogonal flows
index 90609dc..81adcbd 100644 (file)
@@ -99,7 +99,7 @@
 #include "JSWebGLRenderingContextBase.cpp"
 #include "JSWebGLSampler.cpp"
 #include "JSWebGLShader.cpp"
-#include "JSWebGLShaderPrecisionFormat.cpp" 
+#include "JSWebGLShaderPrecisionFormat.cpp"
 #include "JSWebGLSync.cpp"
 #include "JSWebGLTexture.cpp"
 #include "JSWebGLTransformFeedback.cpp"
 #if ENABLE(STREAMS_API)
 #include "JSReadableStream.cpp"
 #include "JSReadableStreamController.cpp"
-#include "JSReadableStreamReader.cpp"
+#include "JSReadableStreamDefaultReader.cpp"
 #include "JSWritableStream.cpp"
 #endif
 #include "JSRect.cpp"
index 5685dc2..26af2da 100644 (file)
@@ -186,7 +186,7 @@ NON_SVG_BINDING_IDLS = \
     $(WebCore)/Modules/streams/CountQueuingStrategy.idl \
     $(WebCore)/Modules/streams/ReadableStream.idl \
     $(WebCore)/Modules/streams/ReadableStreamController.idl \
-    $(WebCore)/Modules/streams/ReadableStreamReader.idl \
+    $(WebCore)/Modules/streams/ReadableStreamDefaultReader.idl \
     $(WebCore)/Modules/streams/ReadableStreamSource.idl \
     $(WebCore)/Modules/streams/WritableStream.idl \
     $(WebCore)/Modules/webaudio/AudioBuffer.idl \
@@ -1298,7 +1298,7 @@ WebCore_BUILTINS_SOURCES = \
     $(WebCore)/Modules/streams/ReadableStream.js \
     $(WebCore)/Modules/streams/ReadableStreamController.js \
     $(WebCore)/Modules/streams/ReadableStreamInternals.js \
-    $(WebCore)/Modules/streams/ReadableStreamReader.js \
+    $(WebCore)/Modules/streams/ReadableStreamDefaultReader.js \
     $(WebCore)/Modules/streams/StreamInternals.js \
     $(WebCore)/Modules/streams/WritableStream.js \
     $(WebCore)/Modules/streams/WritableStreamInternals.js \
index d75004e..438eac4 100644 (file)
@@ -61,16 +61,16 @@ function consumeStream(response, type)
         return @Promise.@reject(new @TypeError("Cannot consume a disturbed Response body ReadableStream"));
 
     try {
-        let reader = new @ReadableStreamReader(response.@body);
+        let reader = new @ReadableStreamDefaultReader(response.@body);
 
         @Response.prototype.@startConsumingStream.@call(response, type);
         let pull = (result) => {
             if (result.done)
                 return @Response.prototype.@finishConsumingStream.@call(response);
             @Response.prototype.@consumeChunk.@call(response, result.value);
-            return @Promise.prototype.@then.@call(@readFromReadableStreamReader(reader), pull);
+            return @Promise.prototype.@then.@call(@readFromReadableStreamDefaultReader(reader), pull);
         }
-        return @Promise.prototype.@then.@call(@readFromReadableStreamReader(reader), pull);
+        return @Promise.prototype.@then.@call(@readFromReadableStreamDefaultReader(reader), pull);
     } catch(e) {
         return @Promise.@reject(e);
     }
index ac328f3..01883ee 100644 (file)
@@ -69,7 +69,7 @@ function body()
         if (@Response.prototype.@isDisturbed.@call(this)) {
             this.@body = new @ReadableStream();
             // Get reader to lock it.
-            new @ReadableStreamReader(this.@body);
+            new @ReadableStreamDefaultReader(this.@body);
         } else {
             var source = @Response.prototype.@createReadableStreamSource.@call(this);
             this.@body = source ? new @ReadableStream(source) : null;
index 72bd530..67e3bd3 100644 (file)
@@ -86,7 +86,7 @@ function getReader()
     if (!@isReadableStream(this))
         throw @makeThisTypeError("ReadableStream", "getReader");
 
-    return new @ReadableStreamReader(this);
+    return new @ReadableStreamDefaultReader(this);
 }
 
 function pipeThrough(streams, options)
@@ -33,7 +33,7 @@
     Exposed=(Window,Worker),
     JSBuiltin,
     NoInterfaceObject
-] interface ReadableStreamReader {
+] interface ReadableStreamDefaultReader {
     [NotEnumerable] Promise read();
     [NotEnumerable] Promise cancel(optional any reason);
     [NotEnumerable] void releaseLock();
@@ -29,8 +29,8 @@ function cancel(reason)
 {
     "use strict";
 
-    if (!@isReadableStreamReader(this))
-        return @Promise.@reject(@makeThisTypeError("ReadableStreamReader", "cancel"));
+    if (!@isReadableStreamDefaultReader(this))
+        return @Promise.@reject(new @TypeError("Can only call ReadableStreamDefaultReader.cancel on instances of ReadableStreamDefaultReader"));
 
     if (!this.@ownerReadableStream)
         return @Promise.@reject(new @TypeError("cancel() called on a reader owned by no readable stream"));
@@ -42,20 +42,20 @@ function read()
 {
     "use strict";
 
-    if (!@isReadableStreamReader(this))
-        return @Promise.@reject(@makeThisTypeError("ReadableStreamReader", "read"));
+    if (!@isReadableStreamDefaultReader(this))
+        return @Promise.@reject(new @TypeError("Can only call ReadableStreamDefaultReader.read on instances of ReadableStreamDefaultReader"));
     if (!this.@ownerReadableStream)
         return @Promise.@reject(new @TypeError("read() called on a reader owned by no readable stream"));
 
-    return @readFromReadableStreamReader(this);
+    return @readFromReadableStreamDefaultReader(this);
 }
 
 function releaseLock()
 {
     "use strict";
 
-    if (!@isReadableStreamReader(this))
-        throw @makeThisTypeError("ReadableStreamReader", "releaseLock");
+    if (!@isReadableStreamDefaultReader(this))
+        throw new @TypeError("Can only call ReadableStreamDefaultReader.releaseLock on instances of ReadableStreamDefaultReader");
 
     const stream = this.@ownerReadableStream;
     if (!stream)
@@ -77,8 +77,8 @@ function closed()
 {
     "use strict";
 
-    if (!@isReadableStreamReader(this))
-        return @Promise.@reject(@makeGetterTypeError("ReadableStreamReader", "closed"));
+    if (!@isReadableStreamDefaultReader(this))
+        return @Promise.@reject(new @TypeError("The ReadableStreamDefaultReader.closed getter can only be used on instances of ReadableStreamDefaultReader"));
 
     return this.@closedPromiseCapability.@promise;
 }
index a9be70f..10909cd 100644 (file)
 // @conditional=ENABLE(STREAMS_API)
 // @internal
 
-function privateInitializeReadableStreamReader(stream)
+function privateInitializeReadableStreamDefaultReader(stream)
 {
     "use strict";
 
     if (!@isReadableStream(stream))
-       throw new @TypeError("ReadableStreamReader needs a ReadableStream");
+       throw new @TypeError("ReadableStreamDefaultReader needs a ReadableStream");
     if (@isReadableStreamLocked(stream))
        throw new @TypeError("ReadableStream is locked");
 
@@ -73,7 +73,7 @@ function teeReadableStream(stream, shouldClone)
     @assert(@isReadableStream(stream));
     @assert(typeof(shouldClone) === "boolean");
 
-    const reader = new @ReadableStreamReader(stream);
+    const reader = new @ReadableStreamDefaultReader(stream);
 
     const teeState = {
         closedOrErrored: false,
@@ -116,7 +116,7 @@ function teeReadableStreamPullFunction(teeState, reader, shouldClone)
     "use strict";
 
     return function() {
-        @Promise.prototype.@then.@call(@readFromReadableStreamReader(reader), function(result) {
+        @Promise.prototype.@then.@call(@readFromReadableStreamDefaultReader(reader), function(result) {
             @assert(@isObject(result));
             @assert(typeof result.done === "boolean");
             if (result.done && !teeState.closedOrErrored) {
@@ -177,7 +177,7 @@ function isReadableStream(stream)
     return @isObject(stream) && !!stream.@underlyingSource;
 }
 
-function isReadableStreamReader(reader)
+function isReadableStreamDefaultReader(reader)
 {
     "use strict";
 
@@ -226,7 +226,7 @@ function requestReadableStreamPull(stream)
         return;
     if ((!@isReadableStreamLocked(stream) || !stream.@reader.@readRequests.length) && @getReadableStreamDesiredSize(stream) <= 0)
         return;
+
     if (stream.@pulling) {
         stream.@pullAgain = true;
         return;
@@ -299,7 +299,7 @@ function closeReadableStream(stream)
     @assert(!stream.@closeRequested);
     @assert(stream.@state !== @streamErrored);
     if (stream.@state === @streamClosed)
-        return; 
+        return;
     stream.@closeRequested = true;
     if (!stream.@queue.content.length)
         @finishClosingReadableStream(stream);
@@ -335,7 +335,7 @@ function enqueueInReadableStream(stream, chunk)
     @requestReadableStreamPull(stream);
 }
 
-function readFromReadableStreamReader(reader)
+function readFromReadableStreamDefaultReader(reader)
 {
     "use strict";
 
index 3b8a366..cd69897 100644 (file)
                7C4C96DC1AD4483500365A60 /* JSWritableStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96D81AD4483500365A60 /* JSWritableStream.cpp */; };
                7C4C96DD1AD4483500365A50 /* JSReadableStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96D91AD4483500365A50 /* JSReadableStream.h */; };
                7C4C96DD1AD4483500365A60 /* JSWritableStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96D91AD4483500365A60 /* JSWritableStream.h */; };
-               7C4C96DE1AD4483500365A50 /* JSReadableStreamReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96DA1AD4483500365A50 /* JSReadableStreamReader.cpp */; };
-               7C4C96DF1AD4483500365A50 /* JSReadableStreamReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96DB1AD4483500365A50 /* JSReadableStreamReader.h */; };
+               7C4C96DE1AD4483500365A50 /* JSReadableStreamDefaultReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96DA1AD4483500365A50 /* JSReadableStreamDefaultReader.cpp */; };
+               7C4C96DF1AD4483500365A50 /* JSReadableStreamDefaultReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96DB1AD4483500365A50 /* JSReadableStreamDefaultReader.h */; };
                7C4C96E31AD44ABF00365A50 /* LaunchServicesSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96E21AD44ABF00365A50 /* LaunchServicesSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7C4EDD741A7B607800198C4D /* FontCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C4EDD731A7B607800198C4D /* FontCocoa.mm */; };
                7C522D4B15B477E8009B7C95 /* InspectorOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C522D4915B477E8009B7C95 /* InspectorOverlay.cpp */; };
                419BC2DD1685329900D64D6D /* VisitedLinkState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisitedLinkState.h; sourceTree = "<group>"; };
                419BE7521BC7F3DB00E1C85B /* WebCoreBuiltinNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreBuiltinNames.h; sourceTree = "<group>"; };
                419BE75A1BCBD3ED00E1C85B /* NavigatorUserMedia.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = NavigatorUserMedia.js; sourceTree = "<group>"; };
-               419FAFAD1ABABCD5005B828B /* ReadableStreamReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamReader.idl; sourceTree = "<group>"; };
+               419FAFAD1ABABCD5005B828B /* ReadableStreamDefaultReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamDefaultReader.idl; sourceTree = "<group>"; };
                41A023ED1A39DB7900F722CF /* ReadableStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStream.idl; sourceTree = "<group>"; };
                41A023ED1A39DB7900F722DF /* WritableStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WritableStream.idl; sourceTree = "<group>"; };
                41A3D58C101C152D00316D07 /* DedicatedWorkerThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DedicatedWorkerThread.cpp; sourceTree = "<group>"; };
                7C4C96D81AD4483500365A60 /* JSWritableStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWritableStream.cpp; sourceTree = "<group>"; };
                7C4C96D91AD4483500365A50 /* JSReadableStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStream.h; sourceTree = "<group>"; };
                7C4C96D91AD4483500365A60 /* JSWritableStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWritableStream.h; sourceTree = "<group>"; };
-               7C4C96DA1AD4483500365A50 /* JSReadableStreamReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamReader.cpp; sourceTree = "<group>"; };
-               7C4C96DB1AD4483500365A50 /* JSReadableStreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStreamReader.h; sourceTree = "<group>"; };
+               7C4C96DA1AD4483500365A50 /* JSReadableStreamDefaultReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamDefaultReader.cpp; sourceTree = "<group>"; };
+               7C4C96DB1AD4483500365A50 /* JSReadableStreamDefaultReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStreamDefaultReader.h; sourceTree = "<group>"; };
                7C4C96E21AD44ABF00365A50 /* LaunchServicesSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LaunchServicesSPI.h; sourceTree = "<group>"; };
                7C4EDD731A7B607800198C4D /* FontCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FontCocoa.mm; sourceTree = "<group>"; };
                7C522D4915B477E8009B7C95 /* InspectorOverlay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorOverlay.cpp; sourceTree = "<group>"; };
                9908B0F11BCACF9100ED0F55 /* StreamInternals.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = StreamInternals.js; sourceTree = "<group>"; };
                9908B0F11BCACF9100ED0F65 /* ReadableStreamInternals.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ReadableStreamInternals.js; sourceTree = "<group>"; };
                9908B0F11BCACF9100ED0F75 /* WritableStreamInternals.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = WritableStreamInternals.js; sourceTree = "<group>"; };
-               9908B0F21BCACF9100ED0F65 /* ReadableStreamReader.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ReadableStreamReader.js; sourceTree = "<group>"; };
+               9908B0F21BCACF9100ED0F65 /* ReadableStreamDefaultReader.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ReadableStreamDefaultReader.js; sourceTree = "<group>"; };
                9908B0F31BCACFFE00ED0F65 /* ByteLengthQueuingStrategyBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ByteLengthQueuingStrategyBuiltins.cpp; sourceTree = "<group>"; };
                9908B0F51BCAD07D00ED0F65 /* ByteLengthQueuingStrategyBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteLengthQueuingStrategyBuiltins.h; sourceTree = "<group>"; };
                9908B0F61BCAD07D00ED0F65 /* CountQueuingStrategyBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CountQueuingStrategyBuiltins.cpp; sourceTree = "<group>"; };
                9908B0FD1BCAD07D00ED0F55 /* StreamInternalsBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StreamInternalsBuiltins.cpp; sourceTree = "<group>"; };
                9908B0FD1BCAD07D00ED0F65 /* ReadableStreamInternalsBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStreamInternalsBuiltins.cpp; sourceTree = "<group>"; };
                9908B0FD1BCAD07D00ED0F75 /* WritableStreamInternalsBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WritableStreamInternalsBuiltins.cpp; sourceTree = "<group>"; };
-               9908B0FE1BCAD07D00ED0F65 /* ReadableStreamReaderBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStreamReaderBuiltins.cpp; sourceTree = "<group>"; };
-               9908B0FF1BCAD07D00ED0F65 /* ReadableStreamReaderBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamReaderBuiltins.h; sourceTree = "<group>"; };
+               9908B0FE1BCAD07D00ED0F65 /* ReadableStreamDefaultReaderBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStreamDefaultReaderBuiltins.cpp; sourceTree = "<group>"; };
+               9908B0FF1BCAD07D00ED0F65 /* ReadableStreamDefaultReaderBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamDefaultReaderBuiltins.h; sourceTree = "<group>"; };
                9920398018B95BC600B39AF9 /* UserInputBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserInputBridge.cpp; sourceTree = "<group>"; };
                9920398118B95BC600B39AF9 /* UserInputBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInputBridge.h; sourceTree = "<group>"; };
                9994E5D81BD843A300F2D835 /* MediaDevices.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = MediaDevices.js; sourceTree = "<group>"; };
                                41189EF71AD8232800B90A0D /* ReadableStreamController.idl */,
                                9908B0F01BCACF9100ED0F65 /* ReadableStreamController.js */,
                                9908B0F11BCACF9100ED0F65 /* ReadableStreamInternals.js */,
-                               419FAFAD1ABABCD5005B828B /* ReadableStreamReader.idl */,
-                               9908B0F21BCACF9100ED0F65 /* ReadableStreamReader.js */,
+                               419FAFAD1ABABCD5005B828B /* ReadableStreamDefaultReader.idl */,
+                               9908B0F21BCACF9100ED0F65 /* ReadableStreamDefaultReader.js */,
                                418C395B1C8F0A610051C8A3 /* ReadableStreamSource.h */,
                                418C395C1C8F0A610051C8A3 /* ReadableStreamSource.idl */,
                                9908B0F11BCACF9100ED0F55 /* StreamInternals.js */,
                                7C4C96D91AD4483500365A50 /* JSReadableStream.h */,
                                6C4C96DA1AD4483500365A50 /* JSReadableStreamController.cpp */,
                                6C4C96DB1AD4483500365A50 /* JSReadableStreamController.h */,
-                               7C4C96DA1AD4483500365A50 /* JSReadableStreamReader.cpp */,
-                               7C4C96DB1AD4483500365A50 /* JSReadableStreamReader.h */,
+                               7C4C96DA1AD4483500365A50 /* JSReadableStreamDefaultReader.cpp */,
+                               7C4C96DB1AD4483500365A50 /* JSReadableStreamDefaultReader.h */,
                                7C4C96D81AD4483500365A60 /* JSWritableStream.cpp */,
                                7C4C96D91AD4483500365A60 /* JSWritableStream.h */,
                        );
                                9908B0FB1BCAD07D00ED0F65 /* ReadableStreamControllerBuiltins.h */,
                                9908B0FD1BCAD07D00ED0F65 /* ReadableStreamInternalsBuiltins.cpp */,
                                9B03D8061BB3110D00B764D9 /* ReadableStreamInternalsBuiltins.h */,
-                               9908B0FE1BCAD07D00ED0F65 /* ReadableStreamReaderBuiltins.cpp */,
-                               9908B0FF1BCAD07D00ED0F65 /* ReadableStreamReaderBuiltins.h */,
+                               9908B0FE1BCAD07D00ED0F65 /* ReadableStreamDefaultReaderBuiltins.cpp */,
+                               9908B0FF1BCAD07D00ED0F65 /* ReadableStreamDefaultReaderBuiltins.h */,
                                5E2C43751BCF9A0B0001E2BC /* RTCPeerConnectionBuiltins.cpp */,
                                5E2C43761BCF9A0B0001E2BC /* RTCPeerConnectionBuiltins.h */,
                                5E2C43781BCF9A0B0001E2BC /* RTCPeerConnectionInternalsBuiltins.cpp */,
                                7C4C96DD1AD4483500365A50 /* JSReadableStream.h in Headers */,
                                6C4C96DF1AD4483500365A50 /* JSReadableStreamController.h in Headers */,
                                4129DF861BB5B80C00322A16 /* JSReadableStreamPrivateConstructors.h in Headers */,
-                               7C4C96DF1AD4483500365A50 /* JSReadableStreamReader.h in Headers */,
+                               7C4C96DF1AD4483500365A50 /* JSReadableStreamDefaultReader.h in Headers */,
                                7E4C96DD1AD4483500365A51 /* JSReadableStreamSource.h in Headers */,
                                BCFE2F120C1B58380020235F /* JSRect.h in Headers */,
                                4998AECE13F9D6C90090B1AA /* JSRequestAnimationFrameCallback.h in Headers */,
                                7C4C96DC1AD4483500365A50 /* JSReadableStream.cpp in Sources */,
                                6C4C96DE1AD4483500365A50 /* JSReadableStreamController.cpp in Sources */,
                                4129DF851BB5B80700322A16 /* JSReadableStreamPrivateConstructors.cpp in Sources */,
-                               7C4C96DE1AD4483500365A50 /* JSReadableStreamReader.cpp in Sources */,
+                               7C4C96DE1AD4483500365A50 /* JSReadableStreamDefaultReader.cpp in Sources */,
                                7E4C96DC1AD4483500365A51 /* JSReadableStreamSource.cpp in Sources */,
                                418C39601C8F0AAE0051C8A3 /* JSReadableStreamSourceCustom.cpp in Sources */,
                                BCFE2F110C1B58370020235F /* JSRect.cpp in Sources */,
index fda2c59..d7fe630 100644 (file)
@@ -94,15 +94,14 @@ void JSDOMGlobalObject::addBuiltinGlobals(VM& vm)
 
 #if ENABLE(STREAMS_API)
     JSObject* privateReadableStreamControllerConstructor = createReadableStreamControllerPrivateConstructor(vm, *this);
-    JSObject* privateReadableStreamReaderConstructor = createReadableStreamReaderPrivateConstructor(vm, *this);
+    JSObject* privateReadableStreamDefaultReaderConstructor = createReadableStreamDefaultReaderPrivateConstructor(vm, *this);
 
     ASSERT(!constructors().get(privateReadableStreamControllerConstructor->info()).get());
-    ASSERT(!constructors().get(privateReadableStreamReaderConstructor->info()).get());
+    ASSERT(!constructors().get(privateReadableStreamDefaultReaderConstructor->info()).get());
     JSC::WriteBarrier<JSC::JSObject> temp;
     constructors().add(privateReadableStreamControllerConstructor->info(), temp).iterator->value.set(vm, this, privateReadableStreamControllerConstructor);
-    constructors().add(privateReadableStreamReaderConstructor->info(), temp).iterator->value.set(vm, this, privateReadableStreamReaderConstructor);
+    constructors().add(privateReadableStreamDefaultReaderConstructor->info(), temp).iterator->value.set(vm, this, privateReadableStreamDefaultReaderConstructor);
 #endif
-
     JSVMClientData& clientData = *static_cast<JSVMClientData*>(vm.clientData);
     JSDOMGlobalObject::GlobalPropertyInfo staticGlobals[] = {
         JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().makeThisTypeErrorPrivateName(),
@@ -117,7 +116,7 @@ void JSDOMGlobalObject::addBuiltinGlobals(VM& vm)
         JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().streamWaitingPrivateName(), jsNumber(5), DontDelete | ReadOnly),
         JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().streamWritablePrivateName(), jsNumber(6), DontDelete | ReadOnly),
         JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().ReadableStreamControllerPrivateName(), privateReadableStreamControllerConstructor, DontDelete | ReadOnly),
-        JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().ReadableStreamReaderPrivateName(), privateReadableStreamReaderConstructor, DontDelete | ReadOnly),
+        JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().ReadableStreamDefaultReaderPrivateName(), privateReadableStreamDefaultReaderConstructor, DontDelete | ReadOnly),
 #endif
     };
     addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
@@ -135,7 +134,7 @@ void JSDOMGlobalObject::finishCreation(VM& vm, JSObject* thisValue)
 {
     Base::finishCreation(vm, thisValue);
     ASSERT(inherits(info()));
-    
+
     addBuiltinGlobals(vm);
 }
 
index 49ddf73..777d05e 100644 (file)
@@ -25,7 +25,7 @@
 #include "JSDOMConstructor.h"
 #include "JSReadableStream.h"
 #include "JSReadableStreamController.h"
-#include "JSReadableStreamReader.h"
+#include "JSReadableStreamDefaultReader.h"
 #include "ReadableStreamInternalsBuiltins.h"
 #include <runtime/CallData.h>
 
@@ -39,11 +39,11 @@ EncodedJSValue JSC_HOST_CALL constructJSReadableStreamController(ExecState& exec
     return throwVMTypeError(&exec, ASCIILiteral("ReadableStreamController constructor should not be called directly"));
 }
 
-EncodedJSValue JSC_HOST_CALL constructJSReadableStreamReader(ExecState& exec)
+EncodedJSValue JSC_HOST_CALL constructJSReadableStreamDefaultReader(ExecState& exec)
 {
     JSReadableStream* stream = jsDynamicCast<JSReadableStream*>(exec.argument(0));
     if (!stream)
-        return throwVMTypeError(&exec, ASCIILiteral("ReadableStreamReader constructor parameter is not a ReadableStream"));
+        return throwVMTypeError(&exec, ASCIILiteral("ReadableStreamDefaultReader constructor parameter is not a ReadableStream"));
 
     JSValue jsFunction = stream->get(&exec, Identifier::fromString(&exec, "getReader"));
 
@@ -54,18 +54,18 @@ EncodedJSValue JSC_HOST_CALL constructJSReadableStreamReader(ExecState& exec)
 }
 
 // Private JS ReadableStreamReder and ReadableStreamController constructors.
-typedef JSBuiltinConstructor<JSReadableStreamReader> JSBuiltinReadableStreamReaderPrivateConstructor;
+typedef JSBuiltinConstructor<JSReadableStreamDefaultReader> JSBuiltinReadableStreamDefaultReaderPrivateConstructor;
 typedef JSBuiltinConstructor<JSReadableStreamController> JSBuiltinReadableStreamControllerPrivateConstructor;
 
-STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSBuiltinReadableStreamReaderPrivateConstructor);
+STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSBuiltinReadableStreamDefaultReaderPrivateConstructor);
 STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSBuiltinReadableStreamControllerPrivateConstructor);
 
-template<> const ClassInfo JSBuiltinReadableStreamReaderPrivateConstructor::s_info = { "ReadableStreamReaderPrivateConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSBuiltinReadableStreamReaderPrivateConstructor) };
+template<> const ClassInfo JSBuiltinReadableStreamDefaultReaderPrivateConstructor::s_info = { "ReadableStreamDefaultReaderPrivateConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSBuiltinReadableStreamDefaultReaderPrivateConstructor) };
 template<> const ClassInfo JSBuiltinReadableStreamControllerPrivateConstructor::s_info = { "ReadableStreamControllerPrivateConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSBuiltinReadableStreamControllerPrivateConstructor) };
 
-template<> FunctionExecutable* JSBuiltinReadableStreamReaderPrivateConstructor::initializeExecutable(JSC::VM& vm)
+template<> FunctionExecutable* JSBuiltinReadableStreamDefaultReaderPrivateConstructor::initializeExecutable(JSC::VM& vm)
 {
-    return readableStreamInternalsPrivateInitializeReadableStreamReaderCodeGenerator(vm);
+    return readableStreamInternalsPrivateInitializeReadableStreamDefaultReaderCodeGenerator(vm);
 }
 
 template<> FunctionExecutable* JSBuiltinReadableStreamControllerPrivateConstructor::initializeExecutable(JSC::VM& vm)
@@ -73,9 +73,9 @@ template<> FunctionExecutable* JSBuiltinReadableStreamControllerPrivateConstruct
     return readableStreamInternalsPrivateInitializeReadableStreamControllerCodeGenerator(vm);
 }
 
-JSObject* createReadableStreamReaderPrivateConstructor(VM& vm, JSDOMGlobalObject& globalObject)
+JSObject* createReadableStreamDefaultReaderPrivateConstructor(VM& vm, JSDOMGlobalObject& globalObject)
 {
-    return JSBuiltinReadableStreamReaderPrivateConstructor::create(vm, JSBuiltinReadableStreamReaderPrivateConstructor::createStructure(vm, globalObject, globalObject.objectPrototype()), globalObject);
+    return JSBuiltinReadableStreamDefaultReaderPrivateConstructor::create(vm, JSBuiltinReadableStreamDefaultReaderPrivateConstructor::createStructure(vm, globalObject, globalObject.objectPrototype()), globalObject);
 }
 
 JSObject* createReadableStreamControllerPrivateConstructor(VM& vm, JSDOMGlobalObject& globalObject)
index eed0ab2..36c6ef2 100644 (file)
@@ -34,7 +34,7 @@ namespace WebCore {
 class JSDOMGlobalObject;
 
 JSC::JSObject* createReadableStreamControllerPrivateConstructor(JSC::VM&, JSDOMGlobalObject&);
-JSC::JSObject* createReadableStreamReaderPrivateConstructor(JSC::VM&, JSDOMGlobalObject&);
+JSC::JSObject* createReadableStreamDefaultReaderPrivateConstructor(JSC::VM&, JSDOMGlobalObject&);
 
 } // namespace WebCore
 
index a266af6..d8ce548 100644 (file)
@@ -96,7 +96,7 @@ namespace WebCore {
     macro(MediaStream) \
     macro(MediaStreamTrack) \
     macro(ReadableStream) \
-    macro(ReadableStreamReader) \
+    macro(ReadableStreamDefaultReader) \
     macro(ReadableStreamController) \
     macro(Request) \
     macro(Response) \
index 2fc203d..6097e82 100644 (file)
         },
         "url": "http://www.w3.org/TR/resource-timing/",
         "webkit-url": "https://webkit.org/b/61138",
-        "keywords": ["resourcetiming","resource timing","rsrc"], 
+        "keywords": ["resourcetiming","resource timing","rsrc"],
         "description": "Provides detailed timing information to JavaScript for sub-resources loaded by the page.",
         "contact": {
             "name": "Jonathan Davis",
         "url": "https://streams.spec.whatwg.org/#rs",
         "webkit-url": "https://bugs.webkit.org/show_bug.cgi?id=138967",
         "specification": "Streams",
-        "comment": "The ReadableStream and ReadableStreamReader interfaces are available but not functional."
+        "comment": "The implementation does not support ReadableStreamBYOBReader."
     },
     {
         "name": "Shadow DOM",