<!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>[191885] 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/191885">191885</a></dd>
<dt>Author</dt> <dd>youenn.fablet@crf.canon.fr</dd>
<dt>Date</dt> <dd>2015-11-02 03:00:35 -0800 (Mon, 02 Nov 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>IDL functions and attributes should be JSBuiltin by default if interface is marked as JSBuiltinConstructor
https://bugs.webkit.org/show_bug.cgi?id=150438
Reviewed by Darin Adler.
Binding generator is now deducing that function/attribute is JSBuiltin if the interface is marked as JSBuiltin.
One exception is custom setters, getters or functions which remain C++ handled.
Updated streams API IDLs accordingly.
Binding generator knows whether class needs a DOM class by checking whether the interface is marked as JSBuiltin.
Binding generator knows that class uses a JS built-in constructor if marked as JSBuiltin+Constructor.
In particular, JSBuiltIn+CustomConstructor means that a DOM class is not needed and constructor is not JS built-in.
Applied JSBuiltin+CustomConstructor to ReadableStreamReader and ReadableStreamController.
Removing ReadableStreamReader and ReadableStreamController classes.
Removed unneeded "Default" keyword for cancel function in WebIDL.
Added a binding test case.
No change in behavior.
* Modules/streams/ByteLengthQueuingStrategy.idl: Marking interface as JSBuiltin and Constructable.
* Modules/streams/CountQueuingStrategy.idl: Ditto.
* Modules/streams/ReadableStream.idl: Ditto.
* Modules/streams/ReadableStreamController.h: Removed.
* Modules/streams/ReadableStreamController.idl: Marking interface as JSBuiltin and Constructable.
* Modules/streams/ReadableStreamReader.h: Removed.
* Modules/streams/ReadableStreamReader.idl: Marking interface as JSBuiltin and Constructable.
* Modules/streams/WritableStream.idl: Ditto.
* bindings/js/JSReadableStreamPrivateConstructors.cpp:
(WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject): Updated according new constructor.
(WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject): Ditto.
* bindings/scripts/CodeGeneratorJS.pm:
(NeedsImplementationClass):
(GetAttributeGetterName):
(GetAttributeSetterName):
(GetFunctionName):
(InstanceNeedsVisitChildren):
(GenerateHeader):
(GenerateAttributesHashTable):
(GenerateImplementation):
(GetConstructorTemplateClassName):
(GenerateConstructorDefinition):
(GenerateConstructorHelperMethods):
(IsConstructable):
(ComputeFunctionSpecial):
(IsJSBuiltin):
(IsJSBuiltinConstructor):
(AddJSBuiltinIncludesIfNeeded):
(GetJSBuiltinFunctionName): Deleted.
(GetJSBuiltinFunctionNameFromString): Deleted.
(GetJSBuiltinScopeName): Deleted.
* bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp:
(webkit_dom_test_js_builtin_constructor_set_property):
(webkit_dom_test_js_builtin_constructor_get_property):
(webkit_dom_test_js_builtin_constructor_class_init):
(webkit_dom_test_js_builtin_constructor_test_function):
(webkit_dom_test_js_builtin_constructor_get_test_attribute):
(webkit_dom_test_js_builtin_constructor_set_test_attribute):
* bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
(WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
(WebCore::JSTestJSBuiltinConstructor::getOwnPropertySlot):
(WebCore::jsTestJSBuiltinConstructorTestAttribute):
(WebCore::jsTestJSBuiltinConstructorTestAttributeCustom):
(WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom):
(WebCore::setJSTestJSBuiltinConstructorTestAttribute):
(WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustom):
(WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestFunction):
(WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction):
(WebCore::JSTestJSBuiltinConstructorOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestJSBuiltinConstructorOwner::finalize):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestJSBuiltinConstructor::toWrapped):
(WebCore::JSTestJSBuiltinConstructorPrototype::createStructure): Deleted.
(WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties): Deleted.
(WebCore::JSTestJSBuiltinConstructor::createPrototype): Deleted.
(WebCore::JSTestJSBuiltinConstructor::getPrototype): Deleted.
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
(WebCore::JSTestJSBuiltinConstructor::create):
(WebCore::JSTestJSBuiltinConstructor::finishCreation):
(WebCore::wrapperOwner):
(WebCore::toJS):
(WebCore::JSTestJSBuiltinConstructor::createStructure): Deleted.
* bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h:
* bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm:
(-[DOMTestJSBuiltinConstructor testAttribute]):
(-[DOMTestJSBuiltinConstructor setTestAttribute:]):
(-[DOMTestJSBuiltinConstructor testAttributeCustom]):
(-[DOMTestJSBuiltinConstructor testAttributeRWCustom]):
(-[DOMTestJSBuiltinConstructor setTestAttributeRWCustom:]):
(-[DOMTestJSBuiltinConstructor testFunction]):
(-[DOMTestJSBuiltinConstructor testCustomFunction]):
* bindings/scripts/test/TestJSBuiltinConstructor.idl:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsByteLengthQueuingStrategyidl">trunk/Source/WebCore/Modules/streams/ByteLengthQueuingStrategy.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsCountQueuingStrategyidl">trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamidl">trunk/Source/WebCore/Modules/streams/ReadableStream.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamControlleridl">trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamReaderidl">trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsWritableStreamidl">trunk/Source/WebCore/Modules/streams/WritableStream.idl</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSReadableStreamPrivateConstructorscpp">trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestJSBuiltinConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestJSBuiltinConstructorh">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestJSBuiltinConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestJSBuiltinConstructorh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestJSBuiltinConstructorh">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestJSBuiltinConstructormm">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestCustomConstructoridl">trunk/Source/WebCore/bindings/scripts/test/TestCustomConstructor.idl</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestJSBuiltinConstructoridl">trunk/Source/WebCore/bindings/scripts/test/TestJSBuiltinConstructor.idl</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamControllerh">trunk/Source/WebCore/Modules/streams/ReadableStreamController.h</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamReaderh">trunk/Source/WebCore/Modules/streams/ReadableStreamReader.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/ChangeLog        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -1,3 +1,101 @@
</span><ins>+2015-11-02 Youenn Fablet <youenn.fablet@crf.canon.fr>
+
+ IDL functions and attributes should be JSBuiltin by default if interface is marked as JSBuiltinConstructor
+ https://bugs.webkit.org/show_bug.cgi?id=150438
+
+ Reviewed by Darin Adler.
+
+ Binding generator is now deducing that function/attribute is JSBuiltin if the interface is marked as JSBuiltin.
+ One exception is custom setters, getters or functions which remain C++ handled.
+ Updated streams API IDLs accordingly.
+
+ Binding generator knows whether class needs a DOM class by checking whether the interface is marked as JSBuiltin.
+ Binding generator knows that class uses a JS built-in constructor if marked as JSBuiltin+Constructor.
+ In particular, JSBuiltIn+CustomConstructor means that a DOM class is not needed and constructor is not JS built-in.
+
+ Applied JSBuiltin+CustomConstructor to ReadableStreamReader and ReadableStreamController.
+ Removing ReadableStreamReader and ReadableStreamController classes.
+
+ Removed unneeded "Default" keyword for cancel function in WebIDL.
+
+ Added a binding test case.
+ No change in behavior.
+
+ * Modules/streams/ByteLengthQueuingStrategy.idl: Marking interface as JSBuiltin and Constructable.
+ * Modules/streams/CountQueuingStrategy.idl: Ditto.
+ * Modules/streams/ReadableStream.idl: Ditto.
+ * Modules/streams/ReadableStreamController.h: Removed.
+ * Modules/streams/ReadableStreamController.idl: Marking interface as JSBuiltin and Constructable.
+ * Modules/streams/ReadableStreamReader.h: Removed.
+ * Modules/streams/ReadableStreamReader.idl: Marking interface as JSBuiltin and Constructable.
+ * Modules/streams/WritableStream.idl: Ditto.
+ * bindings/js/JSReadableStreamPrivateConstructors.cpp:
+ (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject): Updated according new constructor.
+ (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject): Ditto.
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (NeedsImplementationClass):
+ (GetAttributeGetterName):
+ (GetAttributeSetterName):
+ (GetFunctionName):
+ (InstanceNeedsVisitChildren):
+ (GenerateHeader):
+ (GenerateAttributesHashTable):
+ (GenerateImplementation):
+ (GetConstructorTemplateClassName):
+ (GenerateConstructorDefinition):
+ (GenerateConstructorHelperMethods):
+ (IsConstructable):
+ (ComputeFunctionSpecial):
+ (IsJSBuiltin):
+ (IsJSBuiltinConstructor):
+ (AddJSBuiltinIncludesIfNeeded):
+ (GetJSBuiltinFunctionName): Deleted.
+ (GetJSBuiltinFunctionNameFromString): Deleted.
+ (GetJSBuiltinScopeName): Deleted.
+ * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp:
+ (webkit_dom_test_js_builtin_constructor_set_property):
+ (webkit_dom_test_js_builtin_constructor_get_property):
+ (webkit_dom_test_js_builtin_constructor_class_init):
+ (webkit_dom_test_js_builtin_constructor_test_function):
+ (webkit_dom_test_js_builtin_constructor_get_test_attribute):
+ (webkit_dom_test_js_builtin_constructor_set_test_attribute):
+ * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h:
+ * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
+ (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
+ (WebCore::JSTestJSBuiltinConstructor::getOwnPropertySlot):
+ (WebCore::jsTestJSBuiltinConstructorTestAttribute):
+ (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom):
+ (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom):
+ (WebCore::setJSTestJSBuiltinConstructorTestAttribute):
+ (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustom):
+ (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestFunction):
+ (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction):
+ (WebCore::JSTestJSBuiltinConstructorOwner::isReachableFromOpaqueRoots):
+ (WebCore::JSTestJSBuiltinConstructorOwner::finalize):
+ (WebCore::toJSNewlyCreated):
+ (WebCore::toJS):
+ (WebCore::JSTestJSBuiltinConstructor::toWrapped):
+ (WebCore::JSTestJSBuiltinConstructorPrototype::createStructure): Deleted.
+ (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties): Deleted.
+ (WebCore::JSTestJSBuiltinConstructor::createPrototype): Deleted.
+ (WebCore::JSTestJSBuiltinConstructor::getPrototype): Deleted.
+ * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
+ (WebCore::JSTestJSBuiltinConstructor::create):
+ (WebCore::JSTestJSBuiltinConstructor::finishCreation):
+ (WebCore::wrapperOwner):
+ (WebCore::toJS):
+ (WebCore::JSTestJSBuiltinConstructor::createStructure): Deleted.
+ * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h:
+ * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm:
+ (-[DOMTestJSBuiltinConstructor testAttribute]):
+ (-[DOMTestJSBuiltinConstructor setTestAttribute:]):
+ (-[DOMTestJSBuiltinConstructor testAttributeCustom]):
+ (-[DOMTestJSBuiltinConstructor testAttributeRWCustom]):
+ (-[DOMTestJSBuiltinConstructor setTestAttributeRWCustom:]):
+ (-[DOMTestJSBuiltinConstructor testFunction]):
+ (-[DOMTestJSBuiltinConstructor testCustomFunction]):
+ * bindings/scripts/test/TestJSBuiltinConstructor.idl:
+
</ins><span class="cx"> 2015-10-29 Sergio Villar Senin <svillar@igalia.com>
</span><span class="cx">
</span><span class="cx"> [CSS Grid Layout] min-content row does not always shrink
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsByteLengthQueuingStrategyidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ByteLengthQueuingStrategy.idl (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ByteLengthQueuingStrategy.idl        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/Modules/streams/ByteLengthQueuingStrategy.idl        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -28,8 +28,9 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> [
</span><del>- JSBuiltinConstructor,
</del><ins>+ JSBuiltin,
+ Constructor,
</ins><span class="cx"> Conditional=STREAMS_API,
</span><span class="cx"> ] interface ByteLengthQueuingStrategy {
</span><del>- [JSBuiltin] double size();
</del><ins>+ double size();
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsCountQueuingStrategyidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.idl (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.idl        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.idl        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -28,8 +28,9 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> [
</span><del>- JSBuiltinConstructor,
</del><ins>+ JSBuiltin,
+ Constructor,
</ins><span class="cx"> Conditional=STREAMS_API,
</span><span class="cx"> ] interface CountQueuingStrategy {
</span><del>- [JSBuiltin] double size();
</del><ins>+ double size();
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStream.idl (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStream.idl        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/Modules/streams/ReadableStream.idl        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -29,13 +29,14 @@
</span><span class="cx">
</span><span class="cx"> [
</span><span class="cx"> Conditional=STREAMS_API,
</span><del>- JSBuiltinConstructor
</del><ins>+ Constructor,
+ JSBuiltin
</ins><span class="cx"> ] interface ReadableStream {
</span><del>- [JSBuiltin] Promise cancel([Default=Undefined] optional any reason);
- [JSBuiltin] Object getReader();
- [JSBuiltin] Promise pipeTo(any streams, any options);
- [JSBuiltin] Object pipeThrough(any dest, any options);
- [JSBuiltin] Object tee();
</del><ins>+ Promise cancel(optional any reason);
+ Object getReader();
+ Promise pipeTo(any streams, any options);
+ Object pipeThrough(any dest, any options);
+ Object tee();
</ins><span class="cx">
</span><del>- [JSBuiltin] readonly attribute boolean locked;
</del><ins>+ readonly attribute boolean locked;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamControllerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/streams/ReadableStreamController.h (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamController.h        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamController.h        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -1,53 +0,0 @@
</span><del>-/*
- * 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.
- */
-
-#ifndef ReadableStreamController_h
-#define ReadableStreamController_h
-
-#if ENABLE(STREAMS_API)
-
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-// This is a dummy class needed as we cannot yet use JSBuiltinConstructor with NoInterfaceObject.
-// Implementation of ReadableStreamController functionality is done in ReadableStreamController.js
-// FIXME: Find a way to remove that class.
-class ReadableStreamController final : public RefCounted<ReadableStreamController> {
-public:
- static Ref<ReadableStreamController> create() { return adoptRef(* new ReadableStreamController); }
-private:
- ReadableStreamController() { }
-};
-
-}
-
-#endif
-
-#endif // ReadableStream_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamControlleridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -30,12 +30,12 @@
</span><span class="cx"> [
</span><span class="cx"> Conditional=STREAMS_API,
</span><span class="cx"> CustomConstructor,
</span><del>- ImplementationLacksVTable,
</del><ins>+ JSBuiltin,
</ins><span class="cx"> NoInterfaceObject
</span><span class="cx"> ] interface ReadableStreamController {
</span><del>- [JSBuiltin] void enqueue([Default=Undefined] optional any chunk);
- [JSBuiltin] void close();
- [JSBuiltin] void error([Default=Undefined] optional any error);
</del><ins>+ void enqueue(optional any chunk);
+ void close();
+ void error(optional any error);
</ins><span class="cx">
</span><del>- [JSBuiltin] readonly attribute double desiredSize;
</del><ins>+ readonly attribute double desiredSize;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamReaderh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/streams/ReadableStreamReader.h (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamReader.h        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamReader.h        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -1,53 +0,0 @@
</span><del>-/*
- * 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.
- */
-
-#ifndef ReadableStreamReader_h
-#define ReadableStreamReader_h
-
-#if ENABLE(STREAMS_API)
-
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-// This is a dummy class needed as we cannot yet use JSBuiltinConstructor with NoInterfaceObject.
-// Implementation of ReadableStreamReader functionality is done in ReadableStreamReader.js
-// FIXME: Find a way to remove that class.
-class ReadableStreamReader final : public RefCounted<ReadableStreamReader> {
-public:
- static Ref<ReadableStreamReader> create() { return adoptRef(* new ReadableStreamReader); }
-private:
- ReadableStreamReader() { }
-};
-
-}
-
-#endif
-
-#endif // ReadableStream_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamReaderidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -30,12 +30,12 @@
</span><span class="cx"> [
</span><span class="cx"> Conditional=STREAMS_API,
</span><span class="cx"> CustomConstructor,
</span><del>- ImplementationLacksVTable,
</del><ins>+ JSBuiltin,
</ins><span class="cx"> NoInterfaceObject
</span><span class="cx"> ] interface ReadableStreamReader {
</span><del>- [JSBuiltin] Promise read();
- [JSBuiltin] Promise cancel([Default=Undefined] optional any reason);
- [JSBuiltin] void releaseLock();
</del><ins>+ Promise read();
+ Promise cancel(optional any reason);
+ void releaseLock();
</ins><span class="cx">
</span><del>- [JSBuiltin] readonly attribute Promise closed;
</del><ins>+ readonly attribute Promise closed;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsWritableStreamidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/WritableStream.idl (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/WritableStream.idl        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/Modules/streams/WritableStream.idl        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -29,13 +29,14 @@
</span><span class="cx">
</span><span class="cx"> [
</span><span class="cx"> Conditional=STREAMS_API,
</span><del>- JSBuiltinConstructor
</del><ins>+ Constructor,
+ JSBuiltin
</ins><span class="cx"> ] interface WritableStream {
</span><del>- [JSBuiltin] Promise abort([Default=Undefined] optional any reason);
- [JSBuiltin] Promise close();
- [JSBuiltin] Promise write(any chunk);
</del><ins>+ Promise abort(optional any reason);
+ Promise close();
+ Promise write(any chunk);
</ins><span class="cx">
</span><del>- [JSBuiltin] readonly attribute Promise closed;
- [JSBuiltin] readonly attribute Promise ready;
- [JSBuiltin] readonly attribute DOMString state;
</del><ins>+ readonly attribute Promise closed;
+ readonly attribute Promise ready;
+ readonly attribute DOMString state;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSReadableStreamPrivateConstructorscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -65,12 +65,12 @@
</span><span class="cx">
</span><span class="cx"> template<> JSObject* JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject()
</span><span class="cx"> {
</span><del>- return JSReadableStreamReader::create(getDOMStructure<JSReadableStreamReader>(globalObject()->vm(), *globalObject()), globalObject(), ReadableStreamReader::create());
</del><ins>+ return JSReadableStreamReader::create(getDOMStructure<JSReadableStreamReader>(globalObject()->vm(), *globalObject()), globalObject());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<> JSObject* JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject()
</span><span class="cx"> {
</span><del>- return JSReadableStreamController::create(getDOMStructure<JSReadableStreamController>(globalObject()->vm(), *globalObject()), globalObject(), ReadableStreamController::create());
</del><ins>+ return JSReadableStreamController::create(getDOMStructure<JSReadableStreamController>(globalObject()->vm(), *globalObject()), globalObject());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<> FunctionExecutable* JSBuiltinReadableStreamReaderPrivateConstructor::initializeExecutable(JSC::VM& vm)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -522,7 +522,7 @@
</span><span class="cx"> {
</span><span class="cx"> my ($interface) = @_;
</span><span class="cx">
</span><del>- return 0 if ($interface->extendedAttributes->{"JSBuiltinConstructor"});
</del><ins>+ return 0 if ($interface->extendedAttributes->{"JSBuiltin"});
</ins><span class="cx"> return 1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -574,11 +574,11 @@
</span><span class="cx">
</span><span class="cx"> sub GetAttributeGetterName
</span><span class="cx"> {
</span><del>- my ($interfaceName, $className, $attribute) = @_;
</del><ins>+ my ($interfaceName, $className, $interface, $attribute) = @_;
</ins><span class="cx"> if ($attribute->isStatic) {
</span><span class="cx"> return $codeGenerator->WK_lcfirst($className) . "Constructor" . $codeGenerator->WK_ucfirst($attribute->signature->name);
</span><span class="cx"> }
</span><del>- if ($attribute->signature->extendedAttributes->{"JSBuiltin"}) {
</del><ins>+ if (IsJSBuiltin($interface, $attribute)) {
</ins><span class="cx"> return GetJSBuiltinFunctionName($className, $attribute);
</span><span class="cx"> }
</span><span class="cx"> return "js" . $interfaceName . $codeGenerator->WK_ucfirst($attribute->signature->name) . ($attribute->signature->type =~ /Constructor$/ ? "Constructor" : "");
</span><span class="lines">@@ -586,11 +586,11 @@
</span><span class="cx">
</span><span class="cx"> sub GetAttributeSetterName
</span><span class="cx"> {
</span><del>- my ($interfaceName, $className, $attribute) = @_;
</del><ins>+ my ($interfaceName, $className, $interface, $attribute) = @_;
</ins><span class="cx"> if ($attribute->isStatic) {
</span><span class="cx"> return "set" . $codeGenerator->WK_ucfirst($className) . "Constructor" . $codeGenerator->WK_ucfirst($attribute->signature->name);
</span><span class="cx"> }
</span><del>- if ($attribute->signature->extendedAttributes->{"JSBuiltin"}) {
</del><ins>+ if (IsJSBuiltin($interface, $attribute)) {
</ins><span class="cx"> return "set" . $codeGenerator->WK_ucfirst(GetJSBuiltinFunctionName($className, $attribute));
</span><span class="cx"> }
</span><span class="cx"> return "setJS" . $interfaceName . $codeGenerator->WK_ucfirst($attribute->signature->name) . ($attribute->signature->type =~ /Constructor$/ ? "Constructor" : "");
</span><span class="lines">@@ -598,9 +598,9 @@
</span><span class="cx">
</span><span class="cx"> sub GetFunctionName
</span><span class="cx"> {
</span><del>- my ($className, $function) = @_;
</del><ins>+ my ($interface, $className, $function) = @_;
</ins><span class="cx">
</span><del>- if ($function->signature->extendedAttributes->{"JSBuiltin"}) {
</del><ins>+ if (IsJSBuiltin($interface, $function)) {
</ins><span class="cx"> return GetJSBuiltinFunctionName($className, $function);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -830,7 +830,7 @@
</span><span class="cx"> || $interface->extendedAttributes->{"EventTarget"}
</span><span class="cx"> || $interface->name eq "EventTarget"
</span><span class="cx"> || $interface->extendedAttributes->{"ReportExtraMemoryCost"}
</span><del>- || $interface->extendedAttributes->{"JSBuiltinConstructor"};
</del><ins>+ || IsJSBuiltinConstructor($interface)
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> sub GetImplClassName
</span><span class="lines">@@ -1295,7 +1295,7 @@
</span><span class="cx">
</span><span class="cx"> my $conditionalString = $codeGenerator->GenerateConditionalString($function->signature);
</span><span class="cx"> push(@headerContent, "#if ${conditionalString}\n") if $conditionalString;
</span><del>- my $functionName = GetFunctionName($className, $function);
</del><ins>+ my $functionName = GetFunctionName($interface, $className, $function);
</ins><span class="cx"> push(@headerContent, "JSC::EncodedJSValue JSC_HOST_CALL ${functionName}(JSC::ExecState*);\n");
</span><span class="cx"> push(@headerContent, "#endif\n") if $conditionalString;
</span><span class="cx"> }
</span><span class="lines">@@ -1311,10 +1311,10 @@
</span><span class="cx">
</span><span class="cx"> my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
</span><span class="cx"> push(@headerContent, "#if ${conditionalString}\n") if $conditionalString;
</span><del>- my $getter = GetAttributeGetterName($interfaceName, $className, $attribute);
</del><ins>+ my $getter = GetAttributeGetterName($interfaceName, $className, $interface, $attribute);
</ins><span class="cx"> push(@headerContent, "JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);\n");
</span><span class="cx"> if (!IsReadonly($attribute)) {
</span><del>- my $setter = GetAttributeSetterName($interfaceName, $className, $attribute);
</del><ins>+ my $setter = GetAttributeSetterName($interfaceName, $className, $interface, $attribute);
</ins><span class="cx"> push(@headerContent, "void ${setter}(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);\n");
</span><span class="cx"> }
</span><span class="cx"> push(@headerContent, "#endif\n") if $conditionalString;
</span><span class="lines">@@ -1393,18 +1393,18 @@
</span><span class="cx">
</span><span class="cx"> push(@specials, "DontEnum") if ($attribute->signature->extendedAttributes->{"NotEnumerable"} || $is_global_constructor);
</span><span class="cx"> push(@specials, "ReadOnly") if IsReadonly($attribute);
</span><del>- push(@specials, "CustomAccessor") unless $is_global_constructor or $attribute->signature->extendedAttributes->{"JSBuiltin"};
- push(@specials, "Accessor | Builtin") if $attribute->signature->extendedAttributes->{"JSBuiltin"};
</del><ins>+ push(@specials, "CustomAccessor") unless $is_global_constructor or IsJSBuiltin($interface, $attribute);
+ push(@specials, "Accessor | Builtin") if IsJSBuiltin($interface, $attribute);
</ins><span class="cx"> my $special = (@specials > 0) ? join(" | ", @specials) : "0";
</span><span class="cx"> push(@$hashSpecials, $special);
</span><span class="cx">
</span><del>- my $getter = GetAttributeGetterName($interfaceName, $className, $attribute);
</del><ins>+ my $getter = GetAttributeGetterName($interfaceName, $className, $interface, $attribute);
</ins><span class="cx"> push(@$hashValue1, $getter);
</span><span class="cx">
</span><span class="cx"> if (IsReadonly($attribute)) {
</span><span class="cx"> push(@$hashValue2, "0");
</span><span class="cx"> } else {
</span><del>- my $setter = GetAttributeSetterName($interfaceName, $className, $attribute);
</del><ins>+ my $setter = GetAttributeSetterName($interfaceName, $className, $interface, $attribute);
</ins><span class="cx"> push(@$hashValue2, $setter);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1809,7 +1809,7 @@
</span><span class="cx"> next if $function->{overloadIndex} && $function->{overloadIndex} > 1;
</span><span class="cx"> next if $function->signature->extendedAttributes->{"ForwardDeclareInHeader"};
</span><span class="cx"> next if $function->signature->extendedAttributes->{"CustomBinding"};
</span><del>- next if $function->signature->extendedAttributes->{"JSBuiltin"};
</del><ins>+ next if IsJSBuiltin($interface, $function);
</ins><span class="cx">
</span><span class="cx"> my $needsAppleCopyright = $function->signature->extendedAttributes->{"AppleCopyright"};
</span><span class="cx"> if ($needsAppleCopyright) {
</span><span class="lines">@@ -1824,7 +1824,7 @@
</span><span class="cx">
</span><span class="cx"> my $conditionalString = $codeGenerator->GenerateConditionalString($function->signature);
</span><span class="cx"> push(@implContent, "#if ${conditionalString}\n") if $conditionalString;
</span><del>- my $functionName = GetFunctionName($className, $function);
</del><ins>+ my $functionName = GetFunctionName($interface, $className, $function);
</ins><span class="cx"> push(@implContent, "JSC::EncodedJSValue JSC_HOST_CALL ${functionName}(JSC::ExecState*);\n");
</span><span class="cx"> push(@implContent, "#endif\n") if $conditionalString;
</span><span class="cx"> }
</span><span class="lines">@@ -1838,14 +1838,14 @@
</span><span class="cx"> push(@implContent, "// Attributes\n\n");
</span><span class="cx"> foreach my $attribute (@{$interface->attributes}) {
</span><span class="cx"> next if $attribute->signature->extendedAttributes->{"ForwardDeclareInHeader"};
</span><del>- next if $attribute->signature->extendedAttributes->{"JSBuiltin"};
</del><ins>+ next if IsJSBuiltin($interface, $attribute);
</ins><span class="cx">
</span><span class="cx"> my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
</span><span class="cx"> push(@implContent, "#if ${conditionalString}\n") if $conditionalString;
</span><del>- my $getter = GetAttributeGetterName($interfaceName, $className, $attribute);
</del><ins>+ my $getter = GetAttributeGetterName($interfaceName, $className, $interface, $attribute);
</ins><span class="cx"> push(@implContent, "JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);\n");
</span><span class="cx"> if (!IsReadonly($attribute)) {
</span><del>- my $setter = GetAttributeSetterName($interfaceName, $className, $attribute);
</del><ins>+ my $setter = GetAttributeSetterName($interfaceName, $className, $interface, $attribute);
</ins><span class="cx"> push(@implContent, "void ${setter}(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);\n");
</span><span class="cx"> }
</span><span class="cx"> push(@implContent, "#endif\n") if $conditionalString;
</span><span class="lines">@@ -1935,13 +1935,13 @@
</span><span class="cx"> my $special = (@specials > 0) ? join(" | ", @specials) : "0";
</span><span class="cx"> push(@hashSpecials, $special);
</span><span class="cx">
</span><del>- my $getter = GetAttributeGetterName($interfaceName, $className, $attribute);
</del><ins>+ my $getter = GetAttributeGetterName($interfaceName, $className, $interface, $attribute);
</ins><span class="cx"> push(@hashValue1, $getter);
</span><span class="cx">
</span><span class="cx"> if (IsReadonly($attribute)) {
</span><span class="cx"> push(@hashValue2, "0");
</span><span class="cx"> } else {
</span><del>- my $setter = GetAttributeSetterName($interfaceName, $className, $attribute);
</del><ins>+ my $setter = GetAttributeSetterName($interfaceName, $className, $interface, $attribute);
</ins><span class="cx"> push(@hashValue2, $setter);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1959,7 +1959,7 @@
</span><span class="cx"> my $name = $function->signature->name;
</span><span class="cx"> push(@hashKeys, $name);
</span><span class="cx">
</span><del>- my $functionName = GetFunctionName($className, $function);
</del><ins>+ my $functionName = GetFunctionName($interface, $className, $function);
</ins><span class="cx"> push(@hashValue1, $functionName);
</span><span class="cx">
</span><span class="cx"> my $functionLength = GetFunctionLength($function);
</span><span class="lines">@@ -2031,7 +2031,7 @@
</span><span class="cx"> my $name = $function->signature->name;
</span><span class="cx"> push(@hashKeys, $name);
</span><span class="cx">
</span><del>- my $functionName = GetFunctionName($className, $function);
</del><ins>+ my $functionName = GetFunctionName($interface, $className, $function);
</ins><span class="cx"> push(@hashValue1, $functionName);
</span><span class="cx">
</span><span class="cx"> my $functionLength = GetFunctionLength($function);
</span><span class="lines">@@ -2107,7 +2107,7 @@
</span><span class="cx"> AddToImplIncludes("WebCoreJSClientData.h");
</span><span class="cx"> push(@implContent, " JSVMClientData& clientData = *static_cast<JSVMClientData*>(vm.clientData);\n") if $firstPrivateFunction;
</span><span class="cx"> $firstPrivateFunction = 0;
</span><del>- push(@implContent, " putDirect(vm, clientData.builtinNames()." . $function->signature->name . "PrivateName(), JSFunction::create(vm, globalObject(), 0, String(), " . GetFunctionName($className, $function) . "), ReadOnly | DontEnum);\n");
</del><ins>+ push(@implContent, " putDirect(vm, clientData.builtinNames()." . $function->signature->name . "PrivateName(), JSFunction::create(vm, globalObject(), 0, String(), " . GetFunctionName($interface, $className, $function) . "), ReadOnly | DontEnum);\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> push(@implContent, "}\n\n");
</span><span class="lines">@@ -2271,14 +2271,14 @@
</span><span class="cx"> $numAttributes = $numAttributes + 1 if NeedsConstructorProperty($interface);
</span><span class="cx"> if ($numAttributes > 0) {
</span><span class="cx"> foreach my $attribute (@{$interface->attributes}) {
</span><del>- next if $attribute->signature->extendedAttributes->{"JSBuiltin"};
</del><ins>+ next if IsJSBuiltin($interface, $attribute);
</ins><span class="cx">
</span><span class="cx"> my $name = $attribute->signature->name;
</span><span class="cx"> my $type = $attribute->signature->type;
</span><span class="cx"> # Nullable wrapper types do not need any special handling as the implementation can return a null pointer.
</span><span class="cx"> my $isNullable = $attribute->signature->isNullable && !$codeGenerator->IsWrapperType($type);
</span><span class="cx"> $codeGenerator->AssertNotSequenceType($type);
</span><del>- my $getFunctionName = GetAttributeGetterName($interfaceName, $className, $attribute);
</del><ins>+ my $getFunctionName = GetAttributeGetterName($interfaceName, $className, $interface, $attribute);
</ins><span class="cx"> my $implGetterFunctionName = $codeGenerator->WK_lcfirst($attribute->signature->extendedAttributes->{"ImplementedAs"} || $name);
</span><span class="cx"> my $getterExceptions = $attribute->signature->extendedAttributes->{"GetterRaisesException"};
</span><span class="cx">
</span><span class="lines">@@ -2617,11 +2617,11 @@
</span><span class="cx">
</span><span class="cx"> foreach my $attribute (@{$interface->attributes}) {
</span><span class="cx"> if (!IsReadonly($attribute)) {
</span><del>- next if $attribute->signature->extendedAttributes->{"JSBuiltin"};
</del><ins>+ next if IsJSBuiltin($interface, $attribute);
</ins><span class="cx">
</span><span class="cx"> my $name = $attribute->signature->name;
</span><span class="cx"> my $type = $attribute->signature->type;
</span><del>- my $putFunctionName = GetAttributeSetterName($interfaceName, $className, $attribute);
</del><ins>+ my $putFunctionName = GetAttributeSetterName($interfaceName, $className, $interface, $attribute);
</ins><span class="cx"> my $implSetterFunctionName = $codeGenerator->WK_ucfirst($name);
</span><span class="cx"> my $setterRaisesException = $attribute->signature->extendedAttributes->{"SetterRaisesException"};
</span><span class="cx">
</span><span class="lines">@@ -2853,7 +2853,7 @@
</span><span class="cx"> my $inAppleCopyright = 0;
</span><span class="cx"> foreach my $function (@{$interface->functions}) {
</span><span class="cx"> next if $function->signature->extendedAttributes->{"CustomBinding"};
</span><del>- next if $function->signature->extendedAttributes->{"JSBuiltin"};
</del><ins>+ next if IsJSBuiltin($interface, $function);
</ins><span class="cx"> my $needsAppleCopyright = $function->signature->extendedAttributes->{"AppleCopyright"};
</span><span class="cx"> if ($needsAppleCopyright) {
</span><span class="cx"> if (!$inAppleCopyright) {
</span><span class="lines">@@ -2873,7 +2873,7 @@
</span><span class="cx">
</span><span class="cx"> AddIncludesForTypeInImpl($function->signature->type) unless $isCustom or IsReturningPromise($function);
</span><span class="cx">
</span><del>- my $functionName = GetFunctionName($className, $function);
</del><ins>+ my $functionName = GetFunctionName($interface, $className, $function);
</ins><span class="cx">
</span><span class="cx"> my $conditional = $function->signature->extendedAttributes->{"Conditional"};
</span><span class="cx"> if ($conditional) {
</span><span class="lines">@@ -4599,9 +4599,9 @@
</span><span class="cx"> sub GetConstructorTemplateClassName
</span><span class="cx"> {
</span><span class="cx"> my $interface = shift;
</span><del>- return "JSBuiltinConstructor" if ($interface->extendedAttributes->{"JSBuiltinConstructor"});
</del><span class="cx"> return "JSDOMConstructorNotConstructable" if ($interface->extendedAttributes->{"NamedConstructor"});
</span><span class="cx"> return "JSDOMConstructorNotConstructable" unless IsConstructable($interface);
</span><ins>+ return "JSBuiltinConstructor" if IsJSBuiltinConstructor($interface);
</ins><span class="cx"> return "JSDOMConstructor";
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4705,7 +4705,7 @@
</span><span class="cx"> my $generatingNamedConstructor = shift;
</span><span class="cx"> my $function = shift;
</span><span class="cx">
</span><del>- return if ($interface->extendedAttributes->{"JSBuiltinConstructor"});
</del><ins>+ return if IsJSBuiltinConstructor($interface);
</ins><span class="cx">
</span><span class="cx"> my $constructorClassName = $generatingNamedConstructor ? "${className}NamedConstructor" : "${className}Constructor";
</span><span class="cx">
</span><span class="lines">@@ -4955,7 +4955,7 @@
</span><span class="cx"> push(@$outputArray, "\n");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if ($interface->extendedAttributes->{"JSBuiltinConstructor"}) {
</del><ins>+ if (IsJSBuiltinConstructor($interface)) {
</ins><span class="cx"> push(@$outputArray, "template<> FunctionExecutable* ${constructorClassName}::initializeExecutable(VM& vm)\n");
</span><span class="cx"> push(@$outputArray, "{\n");
</span><span class="cx"> push(@$outputArray, " return " . GetJSBuiltinFunctionNameFromString($interfaceName, "initialize" . $interfaceName) . "(vm);\n");
</span><span class="lines">@@ -5009,7 +5009,7 @@
</span><span class="cx"> {
</span><span class="cx"> my $interface = shift;
</span><span class="cx">
</span><del>- return HasCustomConstructor($interface) || $interface->extendedAttributes->{"Constructor"} || $interface->extendedAttributes->{"NamedConstructor"} || $interface->extendedAttributes->{"ConstructorTemplate"} || $interface->extendedAttributes->{"JSBuiltinConstructor"};
</del><ins>+ return HasCustomConstructor($interface) || $interface->extendedAttributes->{"Constructor"} || $interface->extendedAttributes->{"NamedConstructor"} || $interface->extendedAttributes->{"ConstructorTemplate"};
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> sub HeaderNeedsPrototypeDeclaration
</span><span class="lines">@@ -5028,7 +5028,7 @@
</span><span class="cx"> push(@specials, "DontDelete") if $function->signature->extendedAttributes->{"Unforgeable"}
</span><span class="cx"> || $interface->extendedAttributes->{"Unforgeable"};
</span><span class="cx"> push(@specials, "DontEnum") if $function->signature->extendedAttributes->{"NotEnumerable"};
</span><del>- if ($function->signature->extendedAttributes->{"JSBuiltin"}) {
</del><ins>+ if (IsJSBuiltin($interface, $function)) {
</ins><span class="cx"> push(@specials, "JSC::Builtin");
</span><span class="cx"> }
</span><span class="cx"> else {
</span><span class="lines">@@ -5037,6 +5037,29 @@
</span><span class="cx"> return (@specials > 0) ? join(" | ", @specials) : "0";
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub IsJSBuiltin
+{
+ my ($interface, $object) = @_;
+
+ return 0 if $object->signature->extendedAttributes->{"Custom"};
+ return 0 if $object->signature->extendedAttributes->{"CustomGetter"};
+ return 0 if $object->signature->extendedAttributes->{"CustomSetter"};
+
+ return 1 if $object->signature->extendedAttributes->{"JSBuiltin"};
+ return 1 if $interface->extendedAttributes->{"JSBuiltin"};
+
+ return 0;
+}
+
+sub IsJSBuiltinConstructor
+{
+ my ($interface) = @_;
+
+ return 0 if $interface->extendedAttributes->{"CustomConstructor"};
+ return 1 if $interface->extendedAttributes->{"JSBuiltin"};
+ return 0;
+}
+
</ins><span class="cx"> sub GetJSBuiltinFunctionName
</span><span class="cx"> {
</span><span class="cx"> my ($className, $function) = @_;
</span><span class="lines">@@ -5064,17 +5087,17 @@
</span><span class="cx"> {
</span><span class="cx"> my $interface = shift;
</span><span class="cx">
</span><del>- if ($interface->extendedAttributes->{"JSBuiltinConstructor"}) {
</del><ins>+ if ($interface->extendedAttributes->{"JSBuiltin"}) {
</ins><span class="cx"> AddToImplIncludes($interface->name . "Builtins.h");
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> foreach my $function (@{$interface->functions}) {
</span><del>- AddToImplIncludes(GetJSBuiltinScopeName($interface, $function) . "Builtins.h", $function->signature->extendedAttributes->{"Conditional"}) if $function->signature->extendedAttributes->{"JSBuiltin"};
</del><ins>+ AddToImplIncludes(GetJSBuiltinScopeName($interface, $function) . "Builtins.h", $function->signature->extendedAttributes->{"Conditional"}) if IsJSBuiltin($interface, $function);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> foreach my $attribute (@{$interface->attributes}) {
</span><del>- AddToImplIncludes(GetJSBuiltinScopeName($interface, $attribute) . "Builtins.h", $attribute->signature->extendedAttributes->{"Conditional"}) if $attribute->signature->extendedAttributes->{"JSBuiltin"};
</del><ins>+ AddToImplIncludes(GetJSBuiltinScopeName($interface, $attribute) . "Builtins.h", $attribute->signature->extendedAttributes->{"Conditional"}) if IsJSBuiltin($interface, $attribute);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestJSBuiltinConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -67,6 +67,11 @@
</span><span class="cx">
</span><span class="cx"> G_DEFINE_TYPE(WebKitDOMTestJSBuiltinConstructor, webkit_dom_test_js_builtin_constructor, WEBKIT_DOM_TYPE_OBJECT)
</span><span class="cx">
</span><ins>+enum {
+ PROP_0,
+ PROP_TEST_ATTRIBUTE,
+};
+
</ins><span class="cx"> static void webkit_dom_test_js_builtin_constructor_finalize(GObject* object)
</span><span class="cx"> {
</span><span class="cx"> WebKitDOMTestJSBuiltinConstructorPrivate* priv = WEBKIT_DOM_TEST_JS_BUILTIN_CONSTRUCTOR_GET_PRIVATE(object);
</span><span class="lines">@@ -77,6 +82,34 @@
</span><span class="cx"> G_OBJECT_CLASS(webkit_dom_test_js_builtin_constructor_parent_class)->finalize(object);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static void webkit_dom_test_js_builtin_constructor_set_property(GObject* object, guint propertyId, const GValue* value, GParamSpec* pspec)
+{
+ WebKitDOMTestJSBuiltinConstructor* self = WEBKIT_DOM_TEST_JS_BUILTIN_CONSTRUCTOR(object);
+
+ switch (propertyId) {
+ case PROP_TEST_ATTRIBUTE:
+ webkit_dom_test_js_builtin_constructor_set_test_attribute(self, g_value_get_boolean(value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec);
+ break;
+ }
+}
+
+static void webkit_dom_test_js_builtin_constructor_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec)
+{
+ WebKitDOMTestJSBuiltinConstructor* self = WEBKIT_DOM_TEST_JS_BUILTIN_CONSTRUCTOR(object);
+
+ switch (propertyId) {
+ case PROP_TEST_ATTRIBUTE:
+ g_value_set_boolean(value, webkit_dom_test_js_builtin_constructor_get_test_attribute(self));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec);
+ break;
+ }
+}
+
</ins><span class="cx"> static GObject* webkit_dom_test_js_builtin_constructor_constructor(GType type, guint constructPropertiesCount, GObjectConstructParam* constructProperties)
</span><span class="cx"> {
</span><span class="cx"> GObject* object = G_OBJECT_CLASS(webkit_dom_test_js_builtin_constructor_parent_class)->constructor(type, constructPropertiesCount, constructProperties);
</span><span class="lines">@@ -94,6 +127,19 @@
</span><span class="cx"> g_type_class_add_private(gobjectClass, sizeof(WebKitDOMTestJSBuiltinConstructorPrivate));
</span><span class="cx"> gobjectClass->constructor = webkit_dom_test_js_builtin_constructor_constructor;
</span><span class="cx"> gobjectClass->finalize = webkit_dom_test_js_builtin_constructor_finalize;
</span><ins>+ gobjectClass->set_property = webkit_dom_test_js_builtin_constructor_set_property;
+ gobjectClass->get_property = webkit_dom_test_js_builtin_constructor_get_property;
+
+ g_object_class_install_property(
+ gobjectClass,
+ PROP_TEST_ATTRIBUTE,
+ g_param_spec_boolean(
+ "test-attribute",
+ "TestJSBuiltinConstructor:test-attribute",
+ "read-write gboolean TestJSBuiltinConstructor:test-attribute",
+ FALSE,
+ WEBKIT_PARAM_READWRITE));
+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void webkit_dom_test_js_builtin_constructor_init(WebKitDOMTestJSBuiltinConstructor* request)
</span><span class="lines">@@ -102,3 +148,28 @@
</span><span class="cx"> new (priv) WebKitDOMTestJSBuiltinConstructorPrivate();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void webkit_dom_test_js_builtin_constructor_test_function(WebKitDOMTestJSBuiltinConstructor* self)
+{
+ WebCore::JSMainThreadNullState state;
+ g_return_if_fail(WEBKIT_DOM_IS_TEST_JS_BUILTIN_CONSTRUCTOR(self));
+ WebCore::TestJSBuiltinConstructor* item = WebKit::core(self);
+ item->testFunction();
+}
+
+gboolean webkit_dom_test_js_builtin_constructor_get_test_attribute(WebKitDOMTestJSBuiltinConstructor* self)
+{
+ WebCore::JSMainThreadNullState state;
+ g_return_val_if_fail(WEBKIT_DOM_IS_TEST_JS_BUILTIN_CONSTRUCTOR(self), FALSE);
+ WebCore::TestJSBuiltinConstructor* item = WebKit::core(self);
+ gboolean result = item->testAttribute();
+ return result;
+}
+
+void webkit_dom_test_js_builtin_constructor_set_test_attribute(WebKitDOMTestJSBuiltinConstructor* self, gboolean value)
+{
+ WebCore::JSMainThreadNullState state;
+ g_return_if_fail(WEBKIT_DOM_IS_TEST_JS_BUILTIN_CONSTRUCTOR(self));
+ WebCore::TestJSBuiltinConstructor* item = WebKit::core(self);
+ item->setTestAttribute(value);
+}
+
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestJSBuiltinConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -47,6 +47,36 @@
</span><span class="cx"> WEBKIT_API GType
</span><span class="cx"> webkit_dom_test_js_builtin_constructor_get_type(void);
</span><span class="cx">
</span><ins>+/**
+ * webkit_dom_test_js_builtin_constructor_test_function:
+ * @self: A #WebKitDOMTestJSBuiltinConstructor
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_js_builtin_constructor_test_function(WebKitDOMTestJSBuiltinConstructor* self);
+
+/**
+ * webkit_dom_test_js_builtin_constructor_get_test_attribute:
+ * @self: A #WebKitDOMTestJSBuiltinConstructor
+ *
+ * Returns: A #gboolean
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API gboolean
+webkit_dom_test_js_builtin_constructor_get_test_attribute(WebKitDOMTestJSBuiltinConstructor* self);
+
+/**
+ * webkit_dom_test_js_builtin_constructor_set_test_attribute:
+ * @self: A #WebKitDOMTestJSBuiltinConstructor
+ * @value: A #gboolean
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_js_builtin_constructor_set_test_attribute(WebKitDOMTestJSBuiltinConstructor* self, gboolean value);
+
</ins><span class="cx"> G_END_DECLS
</span><span class="cx">
</span><span class="cx"> #endif /* WEBKIT_DOM_USE_UNSTABLE_API */
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestJSBuiltinConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -24,14 +24,22 @@
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "TestJSBuiltinConstructorBuiltins.h"
</span><ins>+#include <runtime/Error.h>
</ins><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="cx">
</span><span class="cx"> using namespace JSC;
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+// Functions
+
+JSC::EncodedJSValue JSC_HOST_CALL jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction(JSC::ExecState*);
+
</ins><span class="cx"> // Attributes
</span><span class="cx">
</span><ins>+JSC::EncodedJSValue jsTestJSBuiltinConstructorTestAttributeCustom(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+JSC::EncodedJSValue jsTestJSBuiltinConstructorTestAttributeRWCustom(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+void setJSTestJSBuiltinConstructorTestAttributeRWCustom(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestJSBuiltinConstructorConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx">
</span><span class="cx"> class JSTestJSBuiltinConstructorPrototype : public JSC::JSNonFinalObject {
</span><span class="lines">@@ -61,6 +69,23 @@
</span><span class="cx">
</span><span class="cx"> typedef JSBuiltinConstructor<JSTestJSBuiltinConstructor> JSTestJSBuiltinConstructorConstructor;
</span><span class="cx">
</span><ins>+/* Hash table for constructor */
+
+static const struct CompactHashIndex JSTestJSBuiltinConstructorTableIndex[4] = {
+ { 0, -1 },
+ { -1, -1 },
+ { 1, -1 },
+ { -1, -1 },
+};
+
+
+static const HashTableValue JSTestJSBuiltinConstructorTableValues[] =
+{
+ { "testAttributeCustom", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestJSBuiltinConstructorTestAttributeCustom), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
+ { "testAttributeRWCustom", DontDelete | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestJSBuiltinConstructorTestAttributeRWCustom), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestJSBuiltinConstructorTestAttributeRWCustom) } },
+};
+
+static const HashTable JSTestJSBuiltinConstructorTable = { 2, 3, true, JSTestJSBuiltinConstructorTableValues, JSTestJSBuiltinConstructorTableIndex };
</ins><span class="cx"> template<> void JSTestJSBuiltinConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
</span><span class="cx"> {
</span><span class="cx"> putDirect(vm, vm.propertyNames->prototype, JSTestJSBuiltinConstructor::getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
</span><span class="lines">@@ -80,6 +105,9 @@
</span><span class="cx"> static const HashTableValue JSTestJSBuiltinConstructorPrototypeTableValues[] =
</span><span class="cx"> {
</span><span class="cx"> { "constructor", DontEnum | ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestJSBuiltinConstructorConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
</span><ins>+ { "testAttribute", Accessor | Builtin, NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(testJSBuiltinConstructorTestAttributeCodeGenerator), (intptr_t) (setTestJSBuiltinConstructorTestAttributeCodeGenerator) } },
+ { "testFunction", JSC::Builtin, NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(testJSBuiltinConstructorTestFunctionCodeGenerator), (intptr_t) (0) } },
+ { "testCustomFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction), (intptr_t) (0) } },
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> const ClassInfo JSTestJSBuiltinConstructorPrototype::s_info = { "TestJSBuiltinConstructorPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestJSBuiltinConstructorPrototype) };
</span><span class="lines">@@ -90,7 +118,7 @@
</span><span class="cx"> reifyStaticProperties(vm, JSTestJSBuiltinConstructorPrototypeTableValues, *this);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const ClassInfo JSTestJSBuiltinConstructor::s_info = { "TestJSBuiltinConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestJSBuiltinConstructor) };
</del><ins>+const ClassInfo JSTestJSBuiltinConstructor::s_info = { "TestJSBuiltinConstructor", &Base::s_info, &JSTestJSBuiltinConstructorTable, CREATE_METHOD_TABLE(JSTestJSBuiltinConstructor) };
</ins><span class="cx">
</span><span class="cx"> JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor(Structure* structure, JSDOMGlobalObject& globalObject)
</span><span class="cx"> : JSDOMObject(structure, globalObject) { }
</span><span class="lines">@@ -111,6 +139,35 @@
</span><span class="cx"> thisObject->JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool JSTestJSBuiltinConstructor::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
+{
+ auto* thisObject = jsCast<JSTestJSBuiltinConstructor*>(object);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+ if (getStaticValueSlot<JSTestJSBuiltinConstructor, Base>(state, JSTestJSBuiltinConstructorTable, thisObject, propertyName, slot))
+ return true;
+ return false;
+}
+
+EncodedJSValue jsTestJSBuiltinConstructorTestAttributeCustom(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
+{
+ UNUSED_PARAM(state);
+ UNUSED_PARAM(slotBase);
+ UNUSED_PARAM(thisValue);
+ auto* castedThis = jsCast<JSTestJSBuiltinConstructor*>(slotBase);
+ return JSValue::encode(castedThis->testAttributeCustom(*state));
+}
+
+
+EncodedJSValue jsTestJSBuiltinConstructorTestAttributeRWCustom(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
+{
+ UNUSED_PARAM(state);
+ UNUSED_PARAM(slotBase);
+ UNUSED_PARAM(thisValue);
+ auto* castedThis = jsCast<JSTestJSBuiltinConstructor*>(slotBase);
+ return JSValue::encode(castedThis->testAttributeRWCustom(*state));
+}
+
+
</ins><span class="cx"> EncodedJSValue jsTestJSBuiltinConstructorConstructor(ExecState* state, JSObject* baseValue, EncodedJSValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx"> JSTestJSBuiltinConstructorPrototype* domObject = jsDynamicCast<JSTestJSBuiltinConstructorPrototype*>(baseValue);
</span><span class="lines">@@ -119,11 +176,33 @@
</span><span class="cx"> return JSValue::encode(JSTestJSBuiltinConstructor::getConstructor(state->vm(), domObject->globalObject()));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void setJSTestJSBuiltinConstructorTestAttributeRWCustom(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+ JSValue value = JSValue::decode(encodedValue);
+ UNUSED_PARAM(baseObject);
+ UNUSED_PARAM(thisValue);
+ auto* castedThis = jsCast<JSTestJSBuiltinConstructor*>(baseObject);
+ UNUSED_PARAM(thisValue);
+ UNUSED_PARAM(state);
+ castedThis->setTestAttributeRWCustom(*state, value);
+}
+
+
</ins><span class="cx"> JSValue JSTestJSBuiltinConstructor::getConstructor(VM& vm, JSGlobalObject* globalObject)
</span><span class="cx"> {
</span><span class="cx"> return getDOMConstructor<JSTestJSBuiltinConstructorConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+EncodedJSValue JSC_HOST_CALL jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction(ExecState* state)
+{
+ JSValue thisValue = state->thisValue();
+ JSTestJSBuiltinConstructor* castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(thisValue);
+ if (UNLIKELY(!castedThis))
+ return throwThisTypeError(*state, "TestJSBuiltinConstructor", "testCustomFunction");
+ ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestJSBuiltinConstructor::info());
+ return JSValue::encode(castedThis->testCustomFunction(*state));
+}
+
</ins><span class="cx"> void JSTestJSBuiltinConstructor::visitChildren(JSCell* cell, SlotVisitor& visitor)
</span><span class="cx"> {
</span><span class="cx"> auto* thisObject = jsCast<JSTestJSBuiltinConstructor*>(cell);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestJSBuiltinConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx">
</span><span class="cx"> static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
</span><span class="cx"> static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
</span><ins>+ static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
</ins><span class="cx"> static void destroy(JSC::JSCell*);
</span><span class="cx">
</span><span class="cx"> DECLARE_INFO;
</span><span class="lines">@@ -49,6 +50,16 @@
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
</span><span class="cx"> static void visitChildren(JSCell*, JSC::SlotVisitor&);
</span><span class="cx">
</span><ins>+
+ // Custom attributes
+ JSC::JSValue testAttributeCustom(JSC::ExecState&) const;
+ JSC::JSValue testAttributeRWCustom(JSC::ExecState&) const;
+ void setTestAttributeRWCustom(JSC::ExecState&, JSC::JSValue);
+
+ // Custom functions
+ JSC::JSValue testCustomFunction(JSC::ExecState&);
+public:
+ static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
</ins><span class="cx"> protected:
</span><span class="cx"> JSTestJSBuiltinConstructor(JSC::Structure*, JSDOMGlobalObject&);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestJSBuiltinConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -28,4 +28,10 @@
</span><span class="cx">
</span><span class="cx"> WEBKIT_CLASS_AVAILABLE_MAC(9876_5)
</span><span class="cx"> WEBCORE_EXPORT @interface DOMTestJSBuiltinConstructor : DOMObject
</span><ins>+@property BOOL testAttribute;
+@property (readonly) BOOL testAttributeCustom;
+@property BOOL testAttributeRWCustom;
+
+- (void)testFunction;
+- (void)testCustomFunction;
</ins><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestJSBuiltinConstructormm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -60,6 +60,48 @@
</span><span class="cx"> [super finalize];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (BOOL)testAttribute
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->testAttribute();
+}
+
+- (void)setTestAttribute:(BOOL)newTestAttribute
+{
+ WebCore::JSMainThreadNullState state;
+ IMPL->setTestAttribute(newTestAttribute);
+}
+
+- (BOOL)testAttributeCustom
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->testAttributeCustom();
+}
+
+- (BOOL)testAttributeRWCustom
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->testAttributeRWCustom();
+}
+
+- (void)setTestAttributeRWCustom:(BOOL)newTestAttributeRWCustom
+{
+ WebCore::JSMainThreadNullState state;
+ IMPL->setTestAttributeRWCustom(newTestAttributeRWCustom);
+}
+
+- (void)testFunction
+{
+ WebCore::JSMainThreadNullState state;
+ IMPL->testFunction();
+}
+
+- (void)testCustomFunction
+{
+ WebCore::JSMainThreadNullState state;
+ IMPL->testCustomFunction();
+}
+
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> WebCore::TestJSBuiltinConstructor* core(DOMTestJSBuiltinConstructor *wrapper)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestCustomConstructoridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestCustomConstructor.idl (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestCustomConstructor.idl        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/bindings/scripts/test/TestCustomConstructor.idl        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> [
</span><span class="cx"> CustomConstructor,
</span><ins>+ JSBuiltIn,
</ins><span class="cx"> NoInterfaceObject
</span><span class="cx"> ] interface TestCustomConstructorWithNoInterfaceObject {
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestJSBuiltinConstructoridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestJSBuiltinConstructor.idl (191884 => 191885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestJSBuiltinConstructor.idl        2015-11-02 10:33:44 UTC (rev 191884)
+++ trunk/Source/WebCore/bindings/scripts/test/TestJSBuiltinConstructor.idl        2015-11-02 11:00:35 UTC (rev 191885)
</span><span class="lines">@@ -27,7 +27,15 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> [
</span><del>- JSBuiltinConstructor
</del><ins>+ JSBuiltin,
+ Constructor
</ins><span class="cx"> ] interface TestJSBuiltinConstructor {
</span><ins>+
+ void testFunction();
+ attribute boolean testAttribute;
+
+ [ Custom ] void testCustomFunction();
+ [ CustomGetter ] readonly attribute boolean testAttributeCustom;
+ [ CustomGetter, CustomSetter ] attribute boolean testAttributeRWCustom;
+
</ins><span class="cx"> };
</span><del>-
</del></span></pre>
</div>
</div>
</body>
</html>