<!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>[190305] trunk/Source</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/190305">190305</a></dd>
<dt>Author</dt> <dd>youenn.fablet@crf.canon.fr</dd>
<dt>Date</dt> <dd>2015-09-29 01:01:09 -0700 (Tue, 29 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add support for WebIDL JSBuiltin attributes
https://bugs.webkit.org/show_bug.cgi?id=149554

Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/Lookup.cpp:
(JSC::reifyStaticAccessor): Adding support for creating attribute getter from JS builtin functions.
* runtime/Lookup.h:
(JSC::HashTableValue::builtinAccessorGetterGenerator):
(JSC::HashTableValue::builtinAccessorSetterGenerator):
(JSC::reifyStaticProperties): Ensuring that builtin attributes are not treated as Builtin functions.

Source/WebCore:

Covered by bindings tests.

* bindings/scripts/CodeGeneratorGObject.pm:
(SkipAttribute): Disabled GObject binding generation of JSBuiltin attribute.
* bindings/scripts/CodeGeneratorJS.pm:
(GetAttributeGetterName): Handling of Builtin function to retrieve BuiltinGenerator.
(GetAttributeSetterName): Ditto.
(GenerateAttributesHashTable): Set JSBuiltin attributes as &quot;Accessor | Builtin&quot;.
(GenerateImplementation): Skip implementation for JSBuiltin attributes
* bindings/scripts/test/JS/JSTestObj.cpp: Adding binding test for JSBuiltin attributes.
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj jsBuiltinAttribute]):
(-[DOMTestObj setJsBuiltinAttribute:]):
(-[DOMTestObj jsBuiltinReadOnlyAttribute]):
* bindings/scripts/test/TestObj.idl: Ditto.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeLookupcpp">trunk/Source/JavaScriptCore/runtime/Lookup.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeLookuph">trunk/Source/JavaScriptCore/runtime/Lookup.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorGObjectpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestObjh">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestObjmm">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestObjidl">trunk/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (190304 => 190305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-09-29 06:51:22 UTC (rev 190304)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-09-29 08:01:09 UTC (rev 190305)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-09-29  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
+
+        Add support for WebIDL JSBuiltin attributes
+        https://bugs.webkit.org/show_bug.cgi?id=149554
+
+        Reviewed by Darin Adler.
+
+        * runtime/Lookup.cpp:
+        (JSC::reifyStaticAccessor): Adding support for creating attribute getter from JS builtin functions.
+        * runtime/Lookup.h:
+        (JSC::HashTableValue::builtinAccessorGetterGenerator):
+        (JSC::HashTableValue::builtinAccessorSetterGenerator):
+        (JSC::reifyStaticProperties): Ensuring that builtin attributes are not treated as Builtin functions.
+
</ins><span class="cx"> 2015-09-28  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove unused parseMemoryAmount
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeLookupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Lookup.cpp (190304 => 190305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Lookup.cpp        2015-09-29 06:51:22 UTC (rev 190304)
+++ trunk/Source/JavaScriptCore/runtime/Lookup.cpp        2015-09-29 08:01:09 UTC (rev 190305)
</span><span class="lines">@@ -35,9 +35,11 @@
</span><span class="cx">         RefPtr&lt;StringImpl&gt; getterName = WTF::tryMakeString(ASCIILiteral(&quot;get &quot;), String(*propertyName.publicName()));
</span><span class="cx">         if (!getterName)
</span><span class="cx">             return;
</span><del>-        accessor-&gt;setGetter(vm, globalObject, JSFunction::create(vm, globalObject, 0, *getterName, value.accessorGetter()));
</del><ins>+        accessor-&gt;setGetter(vm, globalObject, value.attributes() &amp; Builtin
+            ? JSFunction::createBuiltinFunction(vm, value.builtinAccessorGetterGenerator()(vm), globalObject, *getterName)
+            : JSFunction::create(vm, globalObject, 0, *getterName, value.accessorGetter()));
</ins><span class="cx">     }
</span><del>-    thisObj.putDirectNonIndexAccessor(vm, propertyName, accessor, value.attributes());
</del><ins>+    thisObj.putDirectNonIndexAccessor(vm, propertyName, accessor, attributesForStructure(value.attributes()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool setUpStaticFunctionSlot(ExecState* exec, const HashTableValue* entry, JSObject* thisObj, PropertyName propertyName, PropertySlot&amp; slot)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeLookuph"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Lookup.h (190304 => 190305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Lookup.h        2015-09-29 06:51:22 UTC (rev 190304)
+++ trunk/Source/JavaScriptCore/runtime/Lookup.h        2015-09-29 08:01:09 UTC (rev 190305)
</span><span class="lines">@@ -78,6 +78,8 @@
</span><span class="cx"> 
</span><span class="cx">     NativeFunction accessorGetter() const { ASSERT(m_attributes &amp; Accessor); return reinterpret_cast&lt;NativeFunction&gt;(m_values.value1); }
</span><span class="cx">     NativeFunction accessorSetter() const { ASSERT(m_attributes &amp; Accessor); return reinterpret_cast&lt;NativeFunction&gt;(m_values.value2); }
</span><ins>+    BuiltinGenerator builtinAccessorGetterGenerator() const;
+    BuiltinGenerator builtinAccessorSetterGenerator() const;
</ins><span class="cx"> 
</span><span class="cx">     long long constantInteger() const { ASSERT(m_attributes &amp; ConstantInteger); return m_values.constant; }
</span><span class="cx"> 
</span><span class="lines">@@ -183,6 +185,20 @@
</span><span class="cx"> JS_EXPORT_PRIVATE bool setUpStaticFunctionSlot(ExecState*, const HashTableValue*, JSObject* thisObject, PropertyName, PropertySlot&amp;);
</span><span class="cx"> JS_EXPORT_PRIVATE void reifyStaticAccessor(VM&amp;, const HashTableValue&amp;, JSObject&amp; thisObject, PropertyName);
</span><span class="cx"> 
</span><ins>+inline BuiltinGenerator HashTableValue::builtinAccessorGetterGenerator() const
+{
+    ASSERT(m_attributes &amp; Accessor);
+    ASSERT(m_attributes &amp; Builtin);
+    return reinterpret_cast&lt;BuiltinGenerator&gt;(m_values.value1);
+}
+
+inline BuiltinGenerator HashTableValue::builtinAccessorSetterGenerator() const
+{
+    ASSERT(m_attributes &amp; Accessor);
+    ASSERT(m_attributes &amp; Builtin);
+    return reinterpret_cast&lt;BuiltinGenerator&gt;(m_values.value2);
+}
+
</ins><span class="cx"> /**
</span><span class="cx">  * This method does it all (looking in the hashtable, checking for function
</span><span class="cx">  * overrides, creating the function or retrieving from cache, calling
</span><span class="lines">@@ -292,7 +308,10 @@
</span><span class="cx"> 
</span><span class="cx">         Identifier propertyName = Identifier::fromString(&amp;vm, reinterpret_cast&lt;const LChar*&gt;(value.m_key), strlen(value.m_key));
</span><span class="cx">         if (value.attributes() &amp; Builtin) {
</span><del>-            thisObj.putDirectBuiltinFunction(vm, thisObj.globalObject(), propertyName, value.builtinGenerator()(vm), attributesForStructure(value.attributes()));
</del><ins>+            if (value.attributes() &amp; Accessor)
+                reifyStaticAccessor(vm, value, thisObj, propertyName);
+            else
+                thisObj.putDirectBuiltinFunction(vm, thisObj.globalObject(), propertyName, value.builtinGenerator()(vm), attributesForStructure(value.attributes()));
</ins><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (190304 => 190305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-09-29 06:51:22 UTC (rev 190304)
+++ trunk/Source/WebCore/ChangeLog        2015-09-29 08:01:09 UTC (rev 190305)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2015-09-29  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
+
+        Add support for WebIDL JSBuiltin attributes
+        https://bugs.webkit.org/show_bug.cgi?id=149554
+
+        Reviewed by Darin Adler.
+
+        Covered by bindings tests.
+
+        * bindings/scripts/CodeGeneratorGObject.pm:
+        (SkipAttribute): Disabled GObject binding generation of JSBuiltin attribute.
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GetAttributeGetterName): Handling of Builtin function to retrieve BuiltinGenerator.
+        (GetAttributeSetterName): Ditto.
+        (GenerateAttributesHashTable): Set JSBuiltin attributes as &quot;Accessor | Builtin&quot;.
+        (GenerateImplementation): Skip implementation for JSBuiltin attributes
+        * bindings/scripts/test/JS/JSTestObj.cpp: Adding binding test for JSBuiltin attributes.
+        * bindings/scripts/test/ObjC/DOMTestObj.h:
+        * bindings/scripts/test/ObjC/DOMTestObj.mm:
+        (-[DOMTestObj jsBuiltinAttribute]):
+        (-[DOMTestObj setJsBuiltinAttribute:]):
+        (-[DOMTestObj jsBuiltinReadOnlyAttribute]):
+        * bindings/scripts/test/TestObj.idl: Ditto.
+
</ins><span class="cx"> 2015-09-28  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Fix build after r190295.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorGObjectpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (190304 => 190305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm        2015-09-29 06:51:22 UTC (rev 190304)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm        2015-09-29 08:01:09 UTC (rev 190305)
</span><span class="lines">@@ -271,6 +271,10 @@
</span><span class="cx">         return 1;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;JSBuiltin&quot;}) {
+        return 1;
+    }
+
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (190304 => 190305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-09-29 06:51:22 UTC (rev 190304)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-09-29 08:01:09 UTC (rev 190305)
</span><span class="lines">@@ -533,6 +533,9 @@
</span><span class="cx">     if ($attribute-&gt;isStatic) {
</span><span class="cx">         return $codeGenerator-&gt;WK_lcfirst($className) . &quot;Constructor&quot; . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name);
</span><span class="cx">     }
</span><ins>+    if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;JSBuiltin&quot;}) {
+        return GetJSBuiltinFunctionName($className, $attribute-&gt;signature-&gt;name);
+    }
</ins><span class="cx">     return &quot;js&quot; . $interfaceName . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name) . ($attribute-&gt;signature-&gt;type =~ /Constructor$/ ? &quot;Constructor&quot; : &quot;&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -542,6 +545,9 @@
</span><span class="cx">     if ($attribute-&gt;isStatic) {
</span><span class="cx">         return &quot;set&quot; . $codeGenerator-&gt;WK_ucfirst($className) . &quot;Constructor&quot; . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name);
</span><span class="cx">     }
</span><ins>+    if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;JSBuiltin&quot;}) {
+        return &quot;set&quot; . $codeGenerator-&gt;WK_ucfirst(GetJSBuiltinFunctionName($className, $attribute-&gt;signature-&gt;name));
+    }
</ins><span class="cx">     return &quot;setJS&quot; . $interfaceName . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name) . ($attribute-&gt;signature-&gt;type =~ /Constructor$/ ? &quot;Constructor&quot; : &quot;&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1352,7 +1358,8 @@
</span><span class="cx"> 
</span><span class="cx">         push(@specials, &quot;DontEnum&quot;) if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;NotEnumerable&quot;} || $is_global_constructor);
</span><span class="cx">         push(@specials, &quot;ReadOnly&quot;) if IsReadonly($attribute);
</span><del>-        push(@specials, &quot;CustomAccessor&quot;) unless $is_global_constructor;
</del><ins>+        push(@specials, &quot;CustomAccessor&quot;) unless $is_global_constructor or $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;JSBuiltin&quot;};
+        push(@specials, &quot;Accessor | Builtin&quot;) if  $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;JSBuiltin&quot;};
</ins><span class="cx">         my $special = (@specials &gt; 0) ? join(&quot; | &quot;, @specials) : &quot;0&quot;;
</span><span class="cx">         push(@$hashSpecials, $special);
</span><span class="cx"> 
</span><span class="lines">@@ -1797,6 +1804,7 @@
</span><span class="cx">         push(@implContent, &quot;// Attributes\n\n&quot;);
</span><span class="cx">         foreach my $attribute (@{$interface-&gt;attributes}) {
</span><span class="cx">             next if $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;ForwardDeclareInHeader&quot;};
</span><ins>+            next if $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;JSBuiltin&quot;};
</ins><span class="cx"> 
</span><span class="cx">             my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($attribute-&gt;signature);
</span><span class="cx">             push(@implContent, &quot;#if ${conditionalString}\n&quot;) if $conditionalString;
</span><span class="lines">@@ -2229,6 +2237,8 @@
</span><span class="cx">     $numAttributes = $numAttributes + 1 if NeedsConstructorProperty($interface);
</span><span class="cx">     if ($numAttributes &gt; 0) {
</span><span class="cx">         foreach my $attribute (@{$interface-&gt;attributes}) {
</span><ins>+            next if $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;JSBuiltin&quot;};
+
</ins><span class="cx">             my $name = $attribute-&gt;signature-&gt;name;
</span><span class="cx">             my $type = $attribute-&gt;signature-&gt;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="lines">@@ -2573,6 +2583,8 @@
</span><span class="cx"> 
</span><span class="cx">     foreach my $attribute (@{$interface-&gt;attributes}) {
</span><span class="cx">         if (!IsReadonly($attribute)) {
</span><ins>+            next if $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;JSBuiltin&quot;};
+
</ins><span class="cx">             my $name = $attribute-&gt;signature-&gt;name;
</span><span class="cx">             my $type = $attribute-&gt;signature-&gt;type;
</span><span class="cx">             my $putFunctionName = GetAttributeSetterName($interfaceName, $className, $attribute);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (190304 => 190305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2015-09-29 06:51:22 UTC (rev 190304)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2015-09-29 08:01:09 UTC (rev 190305)
</span><span class="lines">@@ -538,6 +538,8 @@
</span><span class="cx">     { &quot;stringAttrWithGetterException&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjStringAttrWithGetterException), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjStringAttrWithGetterException) } },
</span><span class="cx">     { &quot;stringAttrWithSetterException&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjStringAttrWithSetterException), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjStringAttrWithSetterException) } },
</span><span class="cx">     { &quot;strictTypeCheckingAttribute&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjStrictTypeCheckingAttribute), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjStrictTypeCheckingAttribute) } },
</span><ins>+    { &quot;jsBuiltinAttribute&quot;, Accessor | Builtin, NoIntrinsic, { (intptr_t)static_cast&lt;BuiltinGenerator&gt;(testObjJsBuiltinAttributeCodeGenerator), (intptr_t) (setTestObjJsBuiltinAttributeCodeGenerator) } },
+    { &quot;jsBuiltinReadOnlyAttribute&quot;, ReadOnly | Accessor | Builtin, NoIntrinsic, { (intptr_t)static_cast&lt;BuiltinGenerator&gt;(testObjJsBuiltinReadOnlyAttributeCodeGenerator), (intptr_t) (0) } },
</ins><span class="cx">     { &quot;onfoo&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjOnfoo), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjOnfoo) } },
</span><span class="cx">     { &quot;withScriptStateAttribute&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjWithScriptStateAttribute), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjWithScriptStateAttribute) } },
</span><span class="cx">     { &quot;withCallWithAndSetterCallWithAttribute&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjWithCallWithAndSetterCallWithAttribute), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjWithCallWithAndSetterCallWithAttribute) } },
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h (190304 => 190305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h        2015-09-29 06:51:22 UTC (rev 190304)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h        2015-09-29 08:01:09 UTC (rev 190305)
</span><span class="lines">@@ -90,6 +90,8 @@
</span><span class="cx"> @property (copy) NSString *stringAttrWithSetterException;
</span><span class="cx"> @property (strong) DOMTestObj *strictTypeCheckingAttribute;
</span><span class="cx"> @property int customAttr;
</span><ins>+@property (strong) DOMTestObj *jsBuiltinAttribute;
+@property (readonly, strong) DOMTestObj *jsBuiltinReadOnlyAttribute;
</ins><span class="cx"> @property int withScriptStateAttribute;
</span><span class="cx"> @property int withCallWithAndSetterCallWithAttribute;
</span><span class="cx"> @property (strong) DOMTestObj *withScriptExecutionContextAttribute;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestObjmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm (190304 => 190305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm        2015-09-29 06:51:22 UTC (rev 190304)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm        2015-09-29 08:01:09 UTC (rev 190305)
</span><span class="lines">@@ -450,6 +450,26 @@
</span><span class="cx">     IMPL-&gt;setCustomAttr(newCustomAttr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (DOMTestObj *)jsBuiltinAttribute
+{
+    WebCore::JSMainThreadNullState state;
+    return kit(WTF::getPtr(IMPL-&gt;jsBuiltinAttribute()));
+}
+
+- (void)setJsBuiltinAttribute:(DOMTestObj *)newJsBuiltinAttribute
+{
+    WebCore::JSMainThreadNullState state;
+    ASSERT(newJsBuiltinAttribute);
+
+    IMPL-&gt;setJsBuiltinAttribute(core(newJsBuiltinAttribute));
+}
+
+- (DOMTestObj *)jsBuiltinReadOnlyAttribute
+{
+    WebCore::JSMainThreadNullState state;
+    return kit(WTF::getPtr(IMPL-&gt;jsBuiltinReadOnlyAttribute()));
+}
+
</ins><span class="cx"> - (int)withScriptStateAttribute
</span><span class="cx"> {
</span><span class="cx">     WebCore::JSMainThreadNullState state;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (190304 => 190305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2015-09-29 06:51:22 UTC (rev 190304)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2015-09-29 08:01:09 UTC (rev 190305)
</span><span class="lines">@@ -120,6 +120,8 @@
</span><span class="cx">     // 'JSBuiltin' extended attribute
</span><span class="cx">     [JSBuiltin] void jsBuiltinMethod();
</span><span class="cx">     [JSBuiltin] void jsBuiltinMethodWithArgs(long longArg, DOMString strArg, TestObj objArg);
</span><ins>+    [JSBuiltin] attribute TestObj jsBuiltinAttribute;
+    [JSBuiltin] readonly attribute TestObj jsBuiltinReadOnlyAttribute;
</ins><span class="cx"> 
</span><span class="cx">     void addEventListener(DOMString type, EventListener listener, optional boolean useCapture);
</span><span class="cx">     void removeEventListener(DOMString type, EventListener listener, optional boolean useCapture);
</span></span></pre>
</div>
</div>

</body>
</html>