<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[203632] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/203632">203632</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-07-22 23:01:15 -0700 (Fri, 22 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use a private property to implement FetchResponse.body getter
https://bugs.webkit.org/show_bug.cgi?id=159808

Patch by Youenn Fablet &lt;youenn@apple.com&gt; on 2016-07-22
Reviewed by Sam Weinig.

Covered by existing test sets.

Previously, body was handled as a CachedAttribute.
Using a private property will allow direct use of this property from JS built-ins which will allow easier
handling of ReadableStream cloning in Response.clone.
Also, this allows removing some binding custom code.

Updated redirect and error static methods to take NewObject keyword, as this removes a search into cached wrappers.
Ditto for createReadableStreamSource.

* CMakeLists.txt: Removing JSFetchResponseCustom.cpp.
* Modules/fetch/FetchResponse.idl: Adding createReadableStreamSource and isDisturbed private functions.
Making body getter a JSBuiltin.
* Modules/fetch/FetchResponse.js:
(body): Adding getter which will call createReadableStreamSource if needed.
* WebCore.xcodeproj/project.pbxproj: Removing JSFetchResponseCustom.cpp.
* bindings/js/JSFetchResponseCustom.cpp: Removed.
* bindings/js/ReadableStreamController.cpp:
(WebCore::createReadableStream): Deleted.
(WebCore::getReadableStreamReader): Deleted.
* bindings/js/ReadableStreamController.h: Removing unneeded ReadableStream helper routine now that they can be
handled within JS built-in code.
* bindings/js/WebCoreBuiltinNames.h: Adding @createReadableStreamSource, @isDisturbed  and @Response identifiers.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchFetchResponseidl">trunk/Source/WebCore/Modules/fetch/FetchResponse.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchFetchResponsejs">trunk/Source/WebCore/Modules/fetch/FetchResponse.js</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsReadableStreamControllercpp">trunk/Source/WebCore/bindings/js/ReadableStreamController.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsReadableStreamControllerh">trunk/Source/WebCore/bindings/js/ReadableStreamController.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh">trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSFetchResponseCustomcpp">trunk/Source/WebCore/bindings/js/JSFetchResponseCustom.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (203631 => 203632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-07-23 01:56:28 UTC (rev 203631)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-07-23 06:01:15 UTC (rev 203632)
</span><span class="lines">@@ -1148,7 +1148,6 @@
</span><span class="cx">     bindings/js/JSEventListener.cpp
</span><span class="cx">     bindings/js/JSEventTargetCustom.cpp
</span><span class="cx">     bindings/js/JSExceptionBase.cpp
</span><del>-    bindings/js/JSFetchResponseCustom.cpp
</del><span class="cx">     bindings/js/JSFileCustom.cpp
</span><span class="cx">     bindings/js/JSFileReaderCustom.cpp
</span><span class="cx">     bindings/js/JSGeolocationCustom.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (203631 => 203632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-23 01:56:28 UTC (rev 203631)
+++ trunk/Source/WebCore/ChangeLog        2016-07-23 06:01:15 UTC (rev 203632)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2016-07-22  Youenn Fablet  &lt;youenn@apple.com&gt;
+
+        Use a private property to implement FetchResponse.body getter
+        https://bugs.webkit.org/show_bug.cgi?id=159808
+
+        Reviewed by Sam Weinig.
+
+        Covered by existing test sets.
+
+        Previously, body was handled as a CachedAttribute.
+        Using a private property will allow direct use of this property from JS built-ins which will allow easier
+        handling of ReadableStream cloning in Response.clone.
+        Also, this allows removing some binding custom code.
+
+        Updated redirect and error static methods to take NewObject keyword, as this removes a search into cached wrappers.
+        Ditto for createReadableStreamSource.
+
+        * CMakeLists.txt: Removing JSFetchResponseCustom.cpp.
+        * Modules/fetch/FetchResponse.idl: Adding createReadableStreamSource and isDisturbed private functions.
+        Making body getter a JSBuiltin.
+        * Modules/fetch/FetchResponse.js:
+        (body): Adding getter which will call createReadableStreamSource if needed.
+        * WebCore.xcodeproj/project.pbxproj: Removing JSFetchResponseCustom.cpp.
+        * bindings/js/JSFetchResponseCustom.cpp: Removed.
+        * bindings/js/ReadableStreamController.cpp:
+        (WebCore::createReadableStream): Deleted.
+        (WebCore::getReadableStreamReader): Deleted.
+        * bindings/js/ReadableStreamController.h: Removing unneeded ReadableStream helper routine now that they can be
+        handled within JS built-in code.
+        * bindings/js/WebCoreBuiltinNames.h: Adding @createReadableStreamSource, @isDisturbed  and @Response identifiers.
+
</ins><span class="cx"> 2016-07-22  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Handle cases when IOSurface initialization fails.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchFetchResponseidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/fetch/FetchResponse.idl (203631 => 203632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/FetchResponse.idl        2016-07-23 01:56:28 UTC (rev 203631)
+++ trunk/Source/WebCore/Modules/fetch/FetchResponse.idl        2016-07-23 06:01:15 UTC (rev 203632)
</span><span class="lines">@@ -34,12 +34,13 @@
</span><span class="cx">     ConstructorCallWith=ScriptExecutionContext,
</span><span class="cx">     Exposed=(Window,Worker),
</span><span class="cx">     InterfaceName=Response,
</span><del>-    JSBuiltinConstructor
</del><ins>+    JSBuiltinConstructor,
+    PrivateIdentifier,
+    PublicIdentifier
</ins><span class="cx"> ]
</span><span class="cx"> interface FetchResponse {
</span><del>-    // FIXME: NewObject does not seem to be supported for static methods.
-    [CallWith=ScriptExecutionContext] static FetchResponse error();
-    [CallWith=ScriptExecutionContext, RaisesException] static FetchResponse redirect(DOMString url, optional unsigned short status = 302);
</del><ins>+    [NewObject, CallWith=ScriptExecutionContext] static FetchResponse error();
+    [NewObject, CallWith=ScriptExecutionContext, RaisesException] static FetchResponse redirect(DOMString url, optional unsigned short status = 302);
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute ResponseType type;
</span><span class="cx"> 
</span><span class="lines">@@ -50,11 +51,13 @@
</span><span class="cx">     readonly attribute DOMString statusText;
</span><span class="cx">     // FIXME: Add support for SameObject keyword for headers
</span><span class="cx">     readonly attribute FetchHeaders headers;
</span><del>-    [Custom, CachedAttribute] readonly attribute ReadableStream? body;
</del><ins>+    [JSBuiltin] readonly attribute ReadableStream? body;
</ins><span class="cx"> 
</span><span class="cx">     [NewObject, CallWith=ScriptExecutionContext, RaisesException] FetchResponse clone();
</span><span class="cx"> 
</span><span class="cx">     [PrivateIdentifier, RaisesException] void setStatus(unsigned short status, DOMString statusText);
</span><span class="cx">     [CallWith=ScriptState, PrivateIdentifier] void initializeWith(any body);
</span><ins>+    [PrivateIdentifier, NewObject] ReadableStreamSource createReadableStreamSource();
+    [PrivateIdentifier] boolean isDisturbed();
</ins><span class="cx"> };
</span><span class="cx"> FetchResponse implements FetchBody;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchFetchResponsejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/fetch/FetchResponse.js (203631 => 203632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/FetchResponse.js        2016-07-23 01:56:28 UTC (rev 203631)
+++ trunk/Source/WebCore/Modules/fetch/FetchResponse.js        2016-07-23 06:01:15 UTC (rev 203632)
</span><span class="lines">@@ -53,3 +53,18 @@
</span><span class="cx"> 
</span><span class="cx">     return this;
</span><span class="cx"> }
</span><ins>+
+function body()
+{
+    if (!this.@body) {
+        if (@Response.prototype.@isDisturbed.@call(this)) {
+            this.@body = new @ReadableStream();
+            // Get reader to lock it.
+            new @ReadableStreamReader(this.@body);
+        } else {
+            var source = @Response.prototype.@createReadableStreamSource.@call(this);
+            this.@body = source ? new @ReadableStream(source) : null;
+        }
+    }
+    return this.@body;
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (203631 => 203632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-07-23 01:56:28 UTC (rev 203631)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-07-23 06:01:15 UTC (rev 203632)
</span><span class="lines">@@ -1617,7 +1617,6 @@
</span><span class="cx">                 418C395A1C8DD6990051C8A3 /* WorkerGlobalScopeFetch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418C39571C8DD6960051C8A3 /* WorkerGlobalScopeFetch.cpp */; };
</span><span class="cx">                 418C39601C8F0AAE0051C8A3 /* JSReadableStreamSourceCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418C395D1C8F0AAB0051C8A3 /* JSReadableStreamSourceCustom.cpp */; };
</span><span class="cx">                 418C39611C8F0AB10051C8A3 /* ReadableStreamController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418C395E1C8F0AAB0051C8A3 /* ReadableStreamController.cpp */; };
</span><del>-                418C39631C8F129B0051C8A3 /* JSFetchResponseCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418C39621C8F12970051C8A3 /* JSFetchResponseCustom.cpp */; };
</del><span class="cx">                 418F88040FF957AE0080F045 /* JSAbstractWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418F88020FF957AE0080F045 /* JSAbstractWorker.cpp */; };
</span><span class="cx">                 418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 418F88030FF957AE0080F045 /* JSAbstractWorker.h */; };
</span><span class="cx">                 419BC2DE1685329900D64D6D /* VisitedLinkState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 419BC2DC1685329900D64D6D /* VisitedLinkState.cpp */; };
</span><span class="lines">@@ -9198,7 +9197,6 @@
</span><span class="cx">                 418C395D1C8F0AAB0051C8A3 /* JSReadableStreamSourceCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamSourceCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 418C395E1C8F0AAB0051C8A3 /* ReadableStreamController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStreamController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 418C395F1C8F0AAB0051C8A3 /* ReadableStreamController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                418C39621C8F12970051C8A3 /* JSFetchResponseCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFetchResponseCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 418F88020FF957AE0080F045 /* JSAbstractWorker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAbstractWorker.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 418F88030FF957AE0080F045 /* JSAbstractWorker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAbstractWorker.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 419BC2DC1685329900D64D6D /* VisitedLinkState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisitedLinkState.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -22562,7 +22560,6 @@
</span><span class="cx">                                 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */,
</span><span class="cx">                                 3314ACE910892086000F0E56 /* JSExceptionBase.cpp */,
</span><span class="cx">                                 3314ACEA10892086000F0E56 /* JSExceptionBase.h */,
</span><del>-                                418C39621C8F12970051C8A3 /* JSFetchResponseCustom.cpp */,
</del><span class="cx">                                 8F934D841189F1EE00508D5D /* JSMainThreadExecState.cpp */,
</span><span class="cx">                                 8F934D831189F1EE00508D5D /* JSMainThreadExecState.h */,
</span><span class="cx">                                 B56576E417DA599F00A56BDC /* JSMainThreadExecStateInstrumentation.h */,
</span><span class="lines">@@ -30650,7 +30647,6 @@
</span><span class="cx">                                 7D4C96DC1AD4483500365A50 /* JSFetchHeaders.cpp in Sources */,
</span><span class="cx">                                 7E4C96DC1AD4483500365A50 /* JSFetchRequest.cpp in Sources */,
</span><span class="cx">                                 8E4C96DC1AD4483500365A50 /* JSFetchResponse.cpp in Sources */,
</span><del>-                                418C39631C8F129B0051C8A3 /* JSFetchResponseCustom.cpp in Sources */,
</del><span class="cx">                                 BC00F0140E0A189500FD04E3 /* JSFile.cpp in Sources */,
</span><span class="cx">                                 516E54FA1CCB2EA80040D954 /* JSFileCustom.cpp in Sources */,
</span><span class="cx">                                 2E3BC0CA117D3E0800B9409A /* JSFileError.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSFetchResponseCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSFetchResponseCustom.cpp (203631 => 203632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSFetchResponseCustom.cpp        2016-07-23 01:56:28 UTC (rev 203631)
+++ trunk/Source/WebCore/bindings/js/JSFetchResponseCustom.cpp        2016-07-23 06:01:15 UTC (rev 203632)
</span><span class="lines">@@ -1,62 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Canon Inc.
- *
- * 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 &quot;AS IS&quot; 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.
- */
-
-#include &quot;config.h&quot;
-#include &quot;JSFetchResponse.h&quot;
-
-#if ENABLE(FETCH_API)
-
-#include &quot;JSReadableStreamSource.h&quot;
-
-namespace WebCore {
-
-JSC::JSValue JSFetchResponse::body(JSC::ExecState&amp; state) const
-{
-#if ENABLE(STREAMS_API)
-    if (!m_body) {
-        JSC::JSValue readableStream;
-        if (wrapped().isDisturbed()) {
-            readableStream = createReadableStream(state, globalObject(), nullptr);
-            // Let's get the reader to lock it.
-            getReadableStreamReader(state, readableStream);
-        } else {
-            ReadableStreamSource* source = wrapped().createReadableStreamSource();
-            readableStream = source ? createReadableStream(state, globalObject(), source) : JSC::jsNull();
-        }
-        m_body.set(state.vm(), this, readableStream);
-    }
-    return m_body.get();
-#else
-    UNUSED_PARAM(state);
-    return JSC::jsNull();
-#endif
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(FETCH_API)
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsReadableStreamControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ReadableStreamController.cpp (203631 => 203632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ReadableStreamController.cpp        2016-07-23 01:56:28 UTC (rev 203631)
+++ trunk/Source/WebCore/bindings/js/ReadableStreamController.cpp        2016-07-23 06:01:15 UTC (rev 203632)
</span><span class="lines">@@ -84,38 +84,6 @@
</span><span class="cx">     return result.isTrue();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue createReadableStream(JSC::ExecState&amp; state, JSDOMGlobalObject* globalObject, ReadableStreamSource* source)
-{
-    JSC::JSLockHolder lock(&amp;state);
-
-    auto jsSource = source ? toJS(&amp;state, globalObject, *source) : JSC::jsUndefined();
-    JSC::Strong&lt;JSC::Unknown&gt; protect(state.vm(), jsSource);
-
-    JSC::MarkedArgumentBuffer arguments;
-    arguments.append(jsSource);
-
-    auto constructor = JSReadableStream::getConstructor(state.vm(), globalObject);
-
-    JSC::ConstructData constructData;
-    auto constructType = JSC::getConstructData(constructor, constructData);
-    ASSERT(constructType != JSC::ConstructType::None);
-
-    return construct(&amp;state, constructor, constructType, constructData, arguments);
-}
-
-JSC::JSValue getReadableStreamReader(JSC::ExecState&amp; state, JSC::JSValue readableStream)
-{
-    ASSERT(readableStream.isObject());
-
-    auto getReader = readableStream.getObject()-&gt;get(&amp;state, JSC::Identifier::fromString(&amp;state, &quot;getReader&quot;));
-    ASSERT(!state.hadException());
-
-    auto reader = callFunction(state, getReader, readableStream, JSC::MarkedArgumentBuffer());
-    ASSERT(!state.hadException());
-
-    return reader;
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(STREAMS_API)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsReadableStreamControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ReadableStreamController.h (203631 => 203632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ReadableStreamController.h        2016-07-23 01:56:28 UTC (rev 203631)
+++ trunk/Source/WebCore/bindings/js/ReadableStreamController.h        2016-07-23 06:01:15 UTC (rev 203632)
</span><span class="lines">@@ -66,9 +66,6 @@
</span><span class="cx">     JSReadableStreamController* m_jsController { nullptr };
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-JSC::JSValue createReadableStream(JSC::ExecState&amp;, JSDOMGlobalObject*, ReadableStreamSource*);
-JSC::JSValue getReadableStreamReader(JSC::ExecState&amp;, JSC::JSValue);
-
</del><span class="cx"> inline JSDOMGlobalObject* ReadableStreamController::globalObject() const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_jsController);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (203631 => 203632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h        2016-07-23 01:56:28 UTC (rev 203631)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h        2016-07-23 06:01:15 UTC (rev 203632)
</span><span class="lines">@@ -34,10 +34,12 @@
</span><span class="cx"> #define WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro)\
</span><span class="cx">     macro(addTrack) \
</span><span class="cx">     macro(appendFromJS) \
</span><ins>+    macro(body) \
</ins><span class="cx">     macro(closeRequested) \
</span><span class="cx">     macro(closedPromiseCapability) \
</span><span class="cx">     macro(controlledReadableStream) \
</span><span class="cx">     macro(controller) \
</span><ins>+    macro(createReadableStreamSource) \
</ins><span class="cx">     macro(disturbed) \
</span><span class="cx">     macro(fillFromJS) \
</span><span class="cx">     macro(firstReadCallback) \
</span><span class="lines">@@ -46,6 +48,7 @@
</span><span class="cx">     macro(getSenders) \
</span><span class="cx">     macro(getTracks) \
</span><span class="cx">     macro(initializeWith) \
</span><ins>+    macro(isDisturbed) \
</ins><span class="cx">     macro(localStreams) \
</span><span class="cx">     macro(operations) \
</span><span class="cx">     macro(ownerReadableStream) \
</span><span class="lines">@@ -86,6 +89,7 @@
</span><span class="cx">     macro(ReadableStream) \
</span><span class="cx">     macro(ReadableStreamReader) \
</span><span class="cx">     macro(ReadableStreamController) \
</span><ins>+    macro(Response) \
</ins><span class="cx">     macro(RTCIceCandidate) \
</span><span class="cx">     macro(RTCSessionDescription) \
</span><span class="cx">     macro(XMLHttpRequest)
</span></span></pre>
</div>
</div>

</body>
</html>