Title: [203772] trunk
Revision
203772
Author
[email protected]
Date
2016-07-27 03:40:17 -0700 (Wed, 27 Jul 2016)

Log Message

[Streams API] Replace ReadableStreamReader by ReadableStreamDefaultReader
https://bugs.webkit.org/show_bug.cgi?id=160194

Patch by Romain Bellessort <[email protected]> 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:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (203771 => 203772)


--- trunk/LayoutTests/ChangeLog	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/LayoutTests/ChangeLog	2016-07-27 10:40:17 UTC (rev 203772)
@@ -1,3 +1,26 @@
+2016-07-27  Romain Bellessort  <[email protected]>
+
+        [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  <[email protected]>
 
         [css-grid] Handle alignment with orthogonal flows

Modified: trunk/LayoutTests/streams/brand-checks.html (203771 => 203772)


--- trunk/LayoutTests/streams/brand-checks.html	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/LayoutTests/streams/brand-checks.html	2016-07-27 10:40:17 UTC (rev 203772)
@@ -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 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()]; }

Modified: trunk/LayoutTests/streams/readable-stream-controller-error-expected.txt (203771 => 203772)


--- trunk/LayoutTests/streams/readable-stream-controller-error-expected.txt	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/LayoutTests/streams/readable-stream-controller-error-expected.txt	2016-07-27 10:40:17 UTC (rev 203772)
@@ -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 
 

Modified: trunk/LayoutTests/streams/readable-stream-controller-error.html (203771 => 203772)


--- trunk/LayoutTests/streams/readable-stream-controller-error.html	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/LayoutTests/streams/readable-stream-controller-error.html	2016-07-27 10:40:17 UTC (rev 203772)
@@ -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 @@
     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({

Copied: trunk/LayoutTests/streams/readable-stream-default-reader-read-expected.txt (from rev 203771, trunk/LayoutTests/streams/readable-stream-reader-read-expected.txt) (0 => 203772)


--- trunk/LayoutTests/streams/readable-stream-default-reader-read-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/streams/readable-stream-default-reader-read-expected.txt	2016-07-27 10:40:17 UTC (rev 203772)
@@ -0,0 +1,7 @@
+
+PASS Reading twice on a stream that gets closed 
+PASS Reading twice on a closed stream 
+PASS Reading twice on an errored stream 
+PASS Reading twice on a stream that gets errored 
+PASS ReadableStream: if start rejects with no parameter, it should error the stream with an undefined error 
+

Copied: trunk/LayoutTests/streams/readable-stream-default-reader-read.html (from rev 203771, trunk/LayoutTests/streams/readable-stream-reader-read.html) (0 => 203772)


--- trunk/LayoutTests/streams/readable-stream-default-reader-read.html	                        (rev 0)
+++ trunk/LayoutTests/streams/readable-stream-default-reader-read.html	2016-07-27 10:40:17 UTC (rev 203772)
@@ -0,0 +1,153 @@
+<!DOCTYPE html>
+<script src=''></script>
+<script src=''></script>
+<script>
+// This is updated till https://github.com/whatwg/streams/commit/4ba861e6f60c248060811830e11271c84b439cc3
+
+var test1 = async_test('Reading twice on a stream that gets closed');
+test1.step(function() {
+    var controller;
+    var rs = new ReadableStream({
+        start: function(c) {
+            controller = c;
+        }
+    });
+    var counter = 0;
+    var reader = rs.getReader();
+
+    reader.read().then(test1.step_func(function(result) {
+        assert_object_equals(result, { value: undefined, done: true }, 'read() should fulfill with close');
+        assert_equals(++counter, 1);
+    }));
+    reader.read().then(test1.step_func(function(result) {
+        assert_object_equals(result, { value: undefined, done: true }, 'read() should fulfill with close');
+        assert_equals(++counter, 2);
+    }));
+    reader.closed.then(test1.step_func(function() {
+        assert_equals(++counter, 3);
+        test1.done();
+    }));
+
+    controller.close();
+});
+
+var test2 = async_test('Reading twice on a closed stream');
+test2.step(function() {
+    var controller;
+    var rs = new ReadableStream({
+        start: function(c) {
+            controller = c;
+        }
+    });
+
+    controller.close();
+
+    var counter = 0;
+    var reader = rs.getReader();
+
+    reader.read().then(test2.step_func(function(result) {
+        assert_object_equals(result, { value: undefined, done: true }, 'read() should fulfill with close');
+        assert_equals(counter, 0);
+        counter++;
+    }));
+    reader.read().then(test2.step_func(function(result) {
+        assert_object_equals(result, { value: undefined, done: true }, 'read() should fulfill with close');
+        assert_equals(counter, 1);
+        counter++;
+    }));
+    reader.closed.then(test2.step_func(function() {
+        assert_equals(counter, 2);
+        counter++;
+        test2.done();
+    }));
+});
+
+var test3 = async_test('Reading twice on an errored stream');
+test3.step(function() {
+    var controller;
+    var rs = new ReadableStream({
+        start: function(c) {
+            controller = c;
+        }
+    });
+
+    var myError = { potato: "mashed" };
+    controller.error(myError);
+
+    var counter = 0;
+    var reader = rs.getReader();
+
+    reader.read().then(test3.step_func(function() {
+        assert_unreached('read() should reject on an errored stream');
+    }), test3.step_func(function(err) {
+        assert_equals(myError, err);
+        assert_equals(counter, 0);
+        counter++;
+    }));
+    reader.read().then(test3.step_func(function() {
+        assert_unreached('read() should reject on an errored stream');
+    }), test3.step_func(function(err) {
+        assert_equals(myError, err);
+        assert_equals(counter, 1);
+        counter++;
+    }));
+    reader.closed.then(test3.step_func(function() {
+        assert_unreached('read() should reject on an errored stream');
+    }), test3.step_func(function(err) {
+        assert_equals(myError, err);
+        assert_equals(counter, 2);
+        counter++;
+        test3.done();
+    }));
+});
+
+var test4 = async_test('Reading twice on a stream that gets errored');
+test4.step(function() {
+    var controller;
+    var rs = new ReadableStream({
+        start: function(c) {
+            controller = c;
+        }
+    });
+
+    var counter = 0;
+    var reader = rs.getReader();
+
+    reader.read().then(test4.step_func(function() {
+        assert_unreached('read() should reject on an errored stream');
+    }), test4.step_func(function(err) {
+        assert_equals(myError, err);
+        assert_equals(++counter, 1);
+    }));
+    reader.read().then(test4.step_func(function() {
+        assert_unreached('read() should reject on an errored stream');
+    }), test4.step_func(function(err) {
+        assert_equals(myError, err);
+        assert_equals(++counter, 2);
+    }));
+    reader.closed.then(test4.step_func(function() {
+        assert_unreached('read() should reject on an errored stream');
+    }), test4.step_func(function(err) {
+        assert_equals(myError, err);
+        assert_equals(++counter, 3);
+        test4.done();
+    }));
+
+    var myError = { potato: 'mashed' };
+    controller.error(myError);
+ });
+
+var test5 = async_test('ReadableStream: if start rejects with no parameter, it should error the stream with an undefined error');
+test5.step(function() {
+    var rs = new ReadableStream({
+        start: function(c) {
+            return Promise.reject();
+        }
+    });
+
+    rs.getReader().read().catch(test5.step_func(function(e) {
+        assert_equals(typeof e, "undefined");
+        test5.done();
+    }));
+});
+</script>

Modified: trunk/LayoutTests/streams/readable-stream-error-messages-expected.txt (203771 => 203772)


--- trunk/LayoutTests/streams/readable-stream-error-messages-expected.txt	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/LayoutTests/streams/readable-stream-error-messages-expected.txt	2016-07-27 10:40:17 UTC (rev 203772)
@@ -5,11 +5,11 @@
 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 
 

Modified: trunk/LayoutTests/streams/readable-stream-error-messages.html (203771 => 203772)


--- trunk/LayoutTests/streams/readable-stream-error-messages.html	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/LayoutTests/streams/readable-stream-error-messages.html	2016-07-27 10:40:17 UTC (rev 203772)
@@ -59,5 +59,5 @@
     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>

Deleted: trunk/LayoutTests/streams/readable-stream-reader-read-expected.txt (203771 => 203772)


--- trunk/LayoutTests/streams/readable-stream-reader-read-expected.txt	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/LayoutTests/streams/readable-stream-reader-read-expected.txt	2016-07-27 10:40:17 UTC (rev 203772)
@@ -1,7 +0,0 @@
-
-PASS Reading twice on a stream that gets closed 
-PASS Reading twice on a closed stream 
-PASS Reading twice on an errored stream 
-PASS Reading twice on a stream that gets errored 
-PASS ReadableStream: if start rejects with no parameter, it should error the stream with an undefined error 
-

Deleted: trunk/LayoutTests/streams/readable-stream-reader-read.html (203771 => 203772)


--- trunk/LayoutTests/streams/readable-stream-reader-read.html	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/LayoutTests/streams/readable-stream-reader-read.html	2016-07-27 10:40:17 UTC (rev 203772)
@@ -1,153 +0,0 @@
-<!DOCTYPE html>
-<script src=''></script>
-<script src=''></script>
-<script>
-// This is updated till https://github.com/whatwg/streams/commit/4ba861e6f60c248060811830e11271c84b439cc3
-
-var test1 = async_test('Reading twice on a stream that gets closed');
-test1.step(function() {
-    var controller;
-    var rs = new ReadableStream({
-        start: function(c) {
-            controller = c;
-        }
-    });
-    var counter = 0;
-    var reader = rs.getReader();
-
-    reader.read().then(test1.step_func(function(result) {
-        assert_object_equals(result, { value: undefined, done: true }, 'read() should fulfill with close');
-        assert_equals(++counter, 1);
-    }));
-    reader.read().then(test1.step_func(function(result) {
-        assert_object_equals(result, { value: undefined, done: true }, 'read() should fulfill with close');
-        assert_equals(++counter, 2);
-    }));
-    reader.closed.then(test1.step_func(function() {
-        assert_equals(++counter, 3);
-        test1.done();
-    }));
-
-    controller.close();
-});
-
-var test2 = async_test('Reading twice on a closed stream');
-test2.step(function() {
-    var controller;
-    var rs = new ReadableStream({
-        start: function(c) {
-            controller = c;
-        }
-    });
-
-    controller.close();
-
-    var counter = 0;
-    var reader = rs.getReader();
-
-    reader.read().then(test2.step_func(function(result) {
-        assert_object_equals(result, { value: undefined, done: true }, 'read() should fulfill with close');
-        assert_equals(counter, 0);
-        counter++;
-    }));
-    reader.read().then(test2.step_func(function(result) {
-        assert_object_equals(result, { value: undefined, done: true }, 'read() should fulfill with close');
-        assert_equals(counter, 1);
-        counter++;
-    }));
-    reader.closed.then(test2.step_func(function() {
-        assert_equals(counter, 2);
-        counter++;
-        test2.done();
-    }));
-});
-
-var test3 = async_test('Reading twice on an errored stream');
-test3.step(function() {
-    var controller;
-    var rs = new ReadableStream({
-        start: function(c) {
-            controller = c;
-        }
-    });
-
-    var myError = { potato: "mashed" };
-    controller.error(myError);
-
-    var counter = 0;
-    var reader = rs.getReader();
-
-    reader.read().then(test3.step_func(function() {
-        assert_unreached('read() should reject on an errored stream');
-    }), test3.step_func(function(err) {
-        assert_equals(myError, err);
-        assert_equals(counter, 0);
-        counter++;
-    }));
-    reader.read().then(test3.step_func(function() {
-        assert_unreached('read() should reject on an errored stream');
-    }), test3.step_func(function(err) {
-        assert_equals(myError, err);
-        assert_equals(counter, 1);
-        counter++;
-    }));
-    reader.closed.then(test3.step_func(function() {
-        assert_unreached('read() should reject on an errored stream');
-    }), test3.step_func(function(err) {
-        assert_equals(myError, err);
-        assert_equals(counter, 2);
-        counter++;
-        test3.done();
-    }));
-});
-
-var test4 = async_test('Reading twice on a stream that gets errored');
-test4.step(function() {
-    var controller;
-    var rs = new ReadableStream({
-        start: function(c) {
-            controller = c;
-        }
-    });
-
-    var counter = 0;
-    var reader = rs.getReader();
-
-    reader.read().then(test4.step_func(function() {
-        assert_unreached('read() should reject on an errored stream');
-    }), test4.step_func(function(err) {
-        assert_equals(myError, err);
-        assert_equals(++counter, 1);
-    }));
-    reader.read().then(test4.step_func(function() {
-        assert_unreached('read() should reject on an errored stream');
-    }), test4.step_func(function(err) {
-        assert_equals(myError, err);
-        assert_equals(++counter, 2);
-    }));
-    reader.closed.then(test4.step_func(function() {
-        assert_unreached('read() should reject on an errored stream');
-    }), test4.step_func(function(err) {
-        assert_equals(myError, err);
-        assert_equals(++counter, 3);
-        test4.done();
-    }));
-
-    var myError = { potato: 'mashed' };
-    controller.error(myError);
- });
-
-var test5 = async_test('ReadableStream: if start rejects with no parameter, it should error the stream with an undefined error');
-test5.step(function() {
-    var rs = new ReadableStream({
-        start: function(c) {
-            return Promise.reject();
-        }
-    });
-
-    rs.getReader().read().catch(test5.step_func(function(e) {
-        assert_equals(typeof e, "undefined");
-        test5.done();
-    }));
-});
-</script>

Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt (203771 => 203772)


--- trunk/LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt	2016-07-27 10:40:17 UTC (rev 203772)
@@ -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 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 
 

Modified: trunk/LayoutTests/streams/shadowing-Promise-expected.txt (203771 => 203772)


--- trunk/LayoutTests/streams/shadowing-Promise-expected.txt	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/LayoutTests/streams/shadowing-Promise-expected.txt	2016-07-27 10:40:17 UTC (rev 203772)
@@ -8,6 +8,6 @@
 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 
 

Modified: trunk/LayoutTests/streams/shadowing-Promise.html (203771 => 203772)


--- trunk/LayoutTests/streams/shadowing-Promise.html	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/LayoutTests/streams/shadowing-Promise.html	2016-07-27 10:40:17 UTC (rev 203772)
@@ -127,15 +127,15 @@
 }, '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 @@
         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;

Modified: trunk/Source/WebCore/CMakeLists.txt (203771 => 203772)


--- trunk/Source/WebCore/CMakeLists.txt	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/CMakeLists.txt	2016-07-27 10:40:17 UTC (rev 203772)
@@ -263,7 +263,7 @@
     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 @@
     ${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

Modified: trunk/Source/WebCore/ChangeLog (203771 => 203772)


--- trunk/Source/WebCore/ChangeLog	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/ChangeLog	2016-07-27 10:40:17 UTC (rev 203772)
@@ -1,3 +1,49 @@
+2016-07-27  Romain Bellessort  <[email protected]>
+
+        [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  <[email protected]>
 
         [css-grid] Handle alignment with orthogonal flows

Modified: trunk/Source/WebCore/DerivedSources.cpp (203771 => 203772)


--- trunk/Source/WebCore/DerivedSources.cpp	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/DerivedSources.cpp	2016-07-27 10:40:17 UTC (rev 203772)
@@ -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"
@@ -396,7 +396,7 @@
 #if ENABLE(STREAMS_API)
 #include "JSReadableStream.cpp"
 #include "JSReadableStreamController.cpp"
-#include "JSReadableStreamReader.cpp"
+#include "JSReadableStreamDefaultReader.cpp"
 #include "JSWritableStream.cpp"
 #endif
 #include "JSRect.cpp"

Modified: trunk/Source/WebCore/DerivedSources.make (203771 => 203772)


--- trunk/Source/WebCore/DerivedSources.make	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/DerivedSources.make	2016-07-27 10:40:17 UTC (rev 203772)
@@ -186,7 +186,7 @@
     $(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)/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 \

Modified: trunk/Source/WebCore/Modules/fetch/FetchInternals.js (203771 => 203772)


--- trunk/Source/WebCore/Modules/fetch/FetchInternals.js	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/Modules/fetch/FetchInternals.js	2016-07-27 10:40:17 UTC (rev 203772)
@@ -61,7 +61,7 @@
         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) => {
@@ -68,9 +68,9 @@
             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);
     }

Modified: trunk/Source/WebCore/Modules/fetch/FetchResponse.js (203771 => 203772)


--- trunk/Source/WebCore/Modules/fetch/FetchResponse.js	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/Modules/fetch/FetchResponse.js	2016-07-27 10:40:17 UTC (rev 203772)
@@ -69,7 +69,7 @@
         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;

Modified: trunk/Source/WebCore/Modules/streams/ReadableStream.js (203771 => 203772)


--- trunk/Source/WebCore/Modules/streams/ReadableStream.js	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/Modules/streams/ReadableStream.js	2016-07-27 10:40:17 UTC (rev 203772)
@@ -86,7 +86,7 @@
     if (!@isReadableStream(this))
         throw @makeThisTypeError("ReadableStream", "getReader");
 
-    return new @ReadableStreamReader(this);
+    return new @ReadableStreamDefaultReader(this);
 }
 
 function pipeThrough(streams, options)

Copied: trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultReader.idl (from rev 203771, trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl) (0 => 203772)


--- trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultReader.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultReader.idl	2016-07-27 10:40:17 UTC (rev 203772)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2015 Canon Inc.
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted, provided that the following conditions
+ * are required to be met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Canon Inc. nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=STREAMS_API,
+    CustomConstructor(ReadableStream stream),
+    Exposed=(Window,Worker),
+    JSBuiltin,
+    NoInterfaceObject
+] interface ReadableStreamDefaultReader {
+    [NotEnumerable] Promise read();
+    [NotEnumerable] Promise cancel(optional any reason);
+    [NotEnumerable] void releaseLock();
+
+    [NotEnumerable] readonly attribute Promise closed;
+};

Copied: trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultReader.js (from rev 203771, trunk/Source/WebCore/Modules/streams/ReadableStreamReader.js) (0 => 203772)


--- trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultReader.js	                        (rev 0)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultReader.js	2016-07-27 10:40:17 UTC (rev 203772)
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2015 Canon Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// @conditional=ENABLE(STREAMS_API)
+
+function cancel(reason)
+{
+    "use strict";
+
+    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"));
+
+    return @cancelReadableStream(this.@ownerReadableStream, reason);
+}
+
+function read()
+{
+    "use strict";
+
+    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 @readFromReadableStreamDefaultReader(this);
+}
+
+function releaseLock()
+{
+    "use strict";
+
+    if (!@isReadableStreamDefaultReader(this))
+        throw new @TypeError("Can only call ReadableStreamDefaultReader.releaseLock on instances of ReadableStreamDefaultReader");
+
+    const stream = this.@ownerReadableStream;
+    if (!stream)
+         return;
+
+    if ([email protected])
+        throw new @TypeError("There are still pending read requests, cannot release the lock");
+
+    if (stream.@state === @streamReadable)
+        this.@closedPromiseCapability.@reject.@call(@undefined, new @TypeError("releasing lock of reader whose stream is still in readable state"));
+    else
+        this.@closedPromiseCapability = { @promise: @Promise.@reject(new @TypeError("reader released lock")) };
+
+    stream.@reader = @undefined;
+    this.@ownerReadableStream = null;
+}
+
+function closed()
+{
+    "use strict";
+
+    if (!@isReadableStreamDefaultReader(this))
+        return @Promise.@reject(new @TypeError("The ReadableStreamDefaultReader.closed getter can only be used on instances of ReadableStreamDefaultReader"));
+
+    return this.@closedPromiseCapability.@promise;
+}

Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js (203771 => 203772)


--- trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js	2016-07-27 10:40:17 UTC (rev 203772)
@@ -27,12 +27,12 @@
 // @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 @@
     @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 @@
     "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 @@
     return @isObject(stream) && !!stream.@underlyingSource;
 }
 
-function isReadableStreamReader(reader)
+function isReadableStreamDefaultReader(reader)
 {
     "use strict";
 
@@ -226,7 +226,7 @@
         return;
     if ((!@isReadableStreamLocked(stream) || !stream.@[email protected]) && @getReadableStreamDesiredSize(stream) <= 0)
         return;
- 
+
     if (stream.@pulling) {
         stream.@pullAgain = true;
         return;
@@ -299,7 +299,7 @@
     @assert(!stream.@closeRequested);
     @assert(stream.@state !== @streamErrored);
     if (stream.@state === @streamClosed)
-        return; 
+        return;
     stream.@closeRequested = true;
     if ([email protected])
         @finishClosingReadableStream(stream);
@@ -335,7 +335,7 @@
     @requestReadableStreamPull(stream);
 }
 
-function readFromReadableStreamReader(reader)
+function readFromReadableStreamDefaultReader(reader)
 {
     "use strict";
 

Deleted: trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl (203771 => 203772)


--- trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl	2016-07-27 10:40:17 UTC (rev 203772)
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2015 Canon Inc.
- * Copyright (C) 2015 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted, provided that the following conditions
- * are required to be met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Canon Inc. nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
-    Conditional=STREAMS_API,
-    CustomConstructor(ReadableStream stream),
-    Exposed=(Window,Worker),
-    JSBuiltin,
-    NoInterfaceObject
-] interface ReadableStreamReader {
-    [NotEnumerable] Promise read();
-    [NotEnumerable] Promise cancel(optional any reason);
-    [NotEnumerable] void releaseLock();
-
-    [NotEnumerable] readonly attribute Promise closed;
-};

Deleted: trunk/Source/WebCore/Modules/streams/ReadableStreamReader.js (203771 => 203772)


--- trunk/Source/WebCore/Modules/streams/ReadableStreamReader.js	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamReader.js	2016-07-27 10:40:17 UTC (rev 203772)
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2015 Canon Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// @conditional=ENABLE(STREAMS_API)
-
-function cancel(reason)
-{
-    "use strict";
-
-    if (!@isReadableStreamReader(this))
-        return @Promise.@reject(@makeThisTypeError("ReadableStreamReader", "cancel"));
-
-    if (!this.@ownerReadableStream)
-        return @Promise.@reject(new @TypeError("cancel() called on a reader owned by no readable stream"));
-
-    return @cancelReadableStream(this.@ownerReadableStream, reason);
-}
-
-function read()
-{
-    "use strict";
-
-    if (!@isReadableStreamReader(this))
-        return @Promise.@reject(@makeThisTypeError("ReadableStreamReader", "read"));
-    if (!this.@ownerReadableStream)
-        return @Promise.@reject(new @TypeError("read() called on a reader owned by no readable stream"));
-
-    return @readFromReadableStreamReader(this);
-}
-
-function releaseLock()
-{
-    "use strict";
-
-    if (!@isReadableStreamReader(this))
-        throw @makeThisTypeError("ReadableStreamReader", "releaseLock");
-
-    const stream = this.@ownerReadableStream;
-    if (!stream)
-         return;
-
-    if ([email protected])
-        throw new @TypeError("There are still pending read requests, cannot release the lock");
-
-    if (stream.@state === @streamReadable)
-        this.@closedPromiseCapability.@reject.@call(@undefined, new @TypeError("releasing lock of reader whose stream is still in readable state"));
-    else
-        this.@closedPromiseCapability = { @promise: @Promise.@reject(new @TypeError("reader released lock")) };
-
-    stream.@reader = @undefined;
-    this.@ownerReadableStream = null;
-}
-
-function closed()
-{
-    "use strict";
-
-    if (!@isReadableStreamReader(this))
-        return @Promise.@reject(@makeGetterTypeError("ReadableStreamReader", "closed"));
-
-    return this.@closedPromiseCapability.@promise;
-}

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (203771 => 203772)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-07-27 10:40:17 UTC (rev 203772)
@@ -2818,8 +2818,8 @@
 		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 */; };
@@ -9212,7 +9212,7 @@
 		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>"; };
@@ -10559,8 +10559,8 @@
 		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>"; };
@@ -11822,7 +11822,7 @@
 		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>"; };
@@ -11835,8 +11835,8 @@
 		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>"; };
@@ -17071,8 +17071,8 @@
 				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 */,
@@ -17090,8 +17090,8 @@
 				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 */,
 			);
@@ -17945,8 +17945,8 @@
 				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 */,
@@ -27119,7 +27119,7 @@
 				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 */,
@@ -30927,7 +30927,7 @@
 				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 */,

Modified: trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp (203771 => 203772)


--- trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp	2016-07-27 10:40:17 UTC (rev 203772)
@@ -94,15 +94,14 @@
 
 #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 @@
         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 @@
 {
     Base::finishCreation(vm, thisValue);
     ASSERT(inherits(info()));
-    
+
     addBuiltinGlobals(vm);
 }
 

Modified: trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp (203771 => 203772)


--- trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp	2016-07-27 10:40:17 UTC (rev 203772)
@@ -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 @@
     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 @@
 }
 
 // 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 @@
     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)

Modified: trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.h (203771 => 203772)


--- trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.h	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.h	2016-07-27 10:40:17 UTC (rev 203772)
@@ -34,7 +34,7 @@
 class JSDOMGlobalObject;
 
 JSC::JSObject* createReadableStreamControllerPrivateConstructor(JSC::VM&, JSDOMGlobalObject&);
-JSC::JSObject* createReadableStreamReaderPrivateConstructor(JSC::VM&, JSDOMGlobalObject&);
+JSC::JSObject* createReadableStreamDefaultReaderPrivateConstructor(JSC::VM&, JSDOMGlobalObject&);
 
 } // namespace WebCore
 

Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (203771 => 203772)


--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h	2016-07-27 10:40:17 UTC (rev 203772)
@@ -96,7 +96,7 @@
     macro(MediaStream) \
     macro(MediaStreamTrack) \
     macro(ReadableStream) \
-    macro(ReadableStreamReader) \
+    macro(ReadableStreamDefaultReader) \
     macro(ReadableStreamController) \
     macro(Request) \
     macro(Response) \

Modified: trunk/Source/WebCore/features.json (203771 => 203772)


--- trunk/Source/WebCore/features.json	2016-07-27 10:07:19 UTC (rev 203771)
+++ trunk/Source/WebCore/features.json	2016-07-27 10:40:17 UTC (rev 203772)
@@ -219,7 +219,7 @@
         },
         "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",
@@ -678,7 +678,7 @@
         "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",
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to