<!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>[199103] 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/199103">199103</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-04-06 10:33:57 -0700 (Wed, 06 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[IDL] Extend support for [EnabledAtRuntime] attributes / operations to all global objects, not just Window
https://bugs.webkit.org/show_bug.cgi?id=156291

Reviewed by Alex Christensen.

Extend support for [EnabledAtRuntime] attributes / operations to all
global objects, not just Window. This is needed by the Fetch API which
is enabled at runtime and exposed on both Window and WorkerGlobalScope.

* bindings/scripts/CodeGeneratorJS.pm:
(IsDOMGlobalObject):
(OperationShouldBeOnInstance):
(GenerateHeader):
(GeneratePropertiesHashTable):
(GenerateImplementation):
* bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.cpp: Added.
(WebKit::kit):
(WebKit::core):
(WebKit::wrapTestGlobalObject):
(webkit_dom_test_global_object_finalize):
(webkit_dom_test_global_object_set_property):
(webkit_dom_test_global_object_get_property):
(webkit_dom_test_global_object_constructor):
(webkit_dom_test_global_object_class_init):
(webkit_dom_test_global_object_init):
(webkit_dom_test_global_object_regular_operation):
(webkit_dom_test_global_object_enabled_at_runtime_operation):
(webkit_dom_test_global_object_get_regular_attribute):
(webkit_dom_test_global_object_set_regular_attribute):
(webkit_dom_test_global_object_get_enabled_at_runtime_attribute):
(webkit_dom_test_global_object_set_enabled_at_runtime_attribute):
* bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestGlobalObjectPrivate.h: Added.
* bindings/scripts/test/JS/JSTestGlobalObject.cpp: Added.
(WebCore::JSTestGlobalObjectConstructor::prototypeForStructure):
(WebCore::JSTestGlobalObjectConstructor::initializeProperties):
(WebCore::JSTestGlobalObjectPrototype::getOwnPropertySlot):
(WebCore::JSTestGlobalObject::JSTestGlobalObject):
(WebCore::JSTestGlobalObject::finishCreation):
(WebCore::JSTestGlobalObject::destroy):
(WebCore::JSTestGlobalObject::getOwnPropertySlot):
(WebCore::jsTestGlobalObjectRegularAttribute):
(WebCore::jsTestGlobalObjectEnabledAtRuntimeAttribute):
(WebCore::jsTestGlobalObjectConstructor):
(WebCore::setJSTestGlobalObjectConstructor):
(WebCore::setJSTestGlobalObjectRegularAttribute):
(WebCore::setJSTestGlobalObjectEnabledAtRuntimeAttribute):
(WebCore::JSTestGlobalObject::getConstructor):
(WebCore::jsTestGlobalObjectInstanceFunctionRegularOperation):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation):
(WebCore::JSTestGlobalObjectOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestGlobalObjectOwner::finalize):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestGlobalObject::toWrapped):
* bindings/scripts/test/JS/JSTestGlobalObject.h: Added.
(WebCore::JSTestGlobalObject::create):
(WebCore::JSTestGlobalObject::createStructure):
(WebCore::JSTestGlobalObject::finishCreation):
(WebCore::wrapperOwner):
(WebCore::wrapperKey):
(WebCore::toJS):
(WebCore::JSTestGlobalObjectPrototype::create):
(WebCore::JSTestGlobalObjectPrototype::createStructure):
(WebCore::JSTestGlobalObjectPrototype::JSTestGlobalObjectPrototype):
* bindings/scripts/test/ObjC/DOMTestGlobalObject.h: Added.
* bindings/scripts/test/ObjC/DOMTestGlobalObject.mm: Added.
(-[DOMTestGlobalObject dealloc]):
(-[DOMTestGlobalObject regularAttribute]):
(-[DOMTestGlobalObject setRegularAttribute:]):
(-[DOMTestGlobalObject enabledAtRuntimeAttribute]):
(-[DOMTestGlobalObject setEnabledAtRuntimeAttribute:]):
(-[DOMTestGlobalObject regularOperation:]):
(-[DOMTestGlobalObject enabledAtRuntimeOperation:]):
(core):
(kit):
* bindings/scripts/test/ObjC/DOMTestGlobalObjectInternal.h: Added.
* bindings/scripts/test/TestGlobalObject.idl: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestGlobalObjectcpp">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestGlobalObjecth">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestGlobalObjectPrivateh">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGlobalObjectPrivate.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjecth">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestGlobalObjecth">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObject.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestGlobalObjectmm">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObject.mm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestGlobalObjectInternalh">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObjectInternal.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestGlobalObjectidl">trunk/Source/WebCore/bindings/scripts/test/TestGlobalObject.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199102 => 199103)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-06 16:38:41 UTC (rev 199102)
+++ trunk/Source/WebCore/ChangeLog        2016-04-06 17:33:57 UTC (rev 199103)
</span><span class="lines">@@ -1,3 +1,86 @@
</span><ins>+2016-04-06  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        [IDL] Extend support for [EnabledAtRuntime] attributes / operations to all global objects, not just Window
+        https://bugs.webkit.org/show_bug.cgi?id=156291
+
+        Reviewed by Alex Christensen.
+
+        Extend support for [EnabledAtRuntime] attributes / operations to all
+        global objects, not just Window. This is needed by the Fetch API which
+        is enabled at runtime and exposed on both Window and WorkerGlobalScope.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (IsDOMGlobalObject):
+        (OperationShouldBeOnInstance):
+        (GenerateHeader):
+        (GeneratePropertiesHashTable):
+        (GenerateImplementation):
+        * bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.cpp: Added.
+        (WebKit::kit):
+        (WebKit::core):
+        (WebKit::wrapTestGlobalObject):
+        (webkit_dom_test_global_object_finalize):
+        (webkit_dom_test_global_object_set_property):
+        (webkit_dom_test_global_object_get_property):
+        (webkit_dom_test_global_object_constructor):
+        (webkit_dom_test_global_object_class_init):
+        (webkit_dom_test_global_object_init):
+        (webkit_dom_test_global_object_regular_operation):
+        (webkit_dom_test_global_object_enabled_at_runtime_operation):
+        (webkit_dom_test_global_object_get_regular_attribute):
+        (webkit_dom_test_global_object_set_regular_attribute):
+        (webkit_dom_test_global_object_get_enabled_at_runtime_attribute):
+        (webkit_dom_test_global_object_set_enabled_at_runtime_attribute):
+        * bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.h: Added.
+        * bindings/scripts/test/GObject/WebKitDOMTestGlobalObjectPrivate.h: Added.
+        * bindings/scripts/test/JS/JSTestGlobalObject.cpp: Added.
+        (WebCore::JSTestGlobalObjectConstructor::prototypeForStructure):
+        (WebCore::JSTestGlobalObjectConstructor::initializeProperties):
+        (WebCore::JSTestGlobalObjectPrototype::getOwnPropertySlot):
+        (WebCore::JSTestGlobalObject::JSTestGlobalObject):
+        (WebCore::JSTestGlobalObject::finishCreation):
+        (WebCore::JSTestGlobalObject::destroy):
+        (WebCore::JSTestGlobalObject::getOwnPropertySlot):
+        (WebCore::jsTestGlobalObjectRegularAttribute):
+        (WebCore::jsTestGlobalObjectEnabledAtRuntimeAttribute):
+        (WebCore::jsTestGlobalObjectConstructor):
+        (WebCore::setJSTestGlobalObjectConstructor):
+        (WebCore::setJSTestGlobalObjectRegularAttribute):
+        (WebCore::setJSTestGlobalObjectEnabledAtRuntimeAttribute):
+        (WebCore::JSTestGlobalObject::getConstructor):
+        (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperation):
+        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1):
+        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2):
+        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation):
+        (WebCore::JSTestGlobalObjectOwner::isReachableFromOpaqueRoots):
+        (WebCore::JSTestGlobalObjectOwner::finalize):
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestGlobalObject::toWrapped):
+        * bindings/scripts/test/JS/JSTestGlobalObject.h: Added.
+        (WebCore::JSTestGlobalObject::create):
+        (WebCore::JSTestGlobalObject::createStructure):
+        (WebCore::JSTestGlobalObject::finishCreation):
+        (WebCore::wrapperOwner):
+        (WebCore::wrapperKey):
+        (WebCore::toJS):
+        (WebCore::JSTestGlobalObjectPrototype::create):
+        (WebCore::JSTestGlobalObjectPrototype::createStructure):
+        (WebCore::JSTestGlobalObjectPrototype::JSTestGlobalObjectPrototype):
+        * bindings/scripts/test/ObjC/DOMTestGlobalObject.h: Added.
+        * bindings/scripts/test/ObjC/DOMTestGlobalObject.mm: Added.
+        (-[DOMTestGlobalObject dealloc]):
+        (-[DOMTestGlobalObject regularAttribute]):
+        (-[DOMTestGlobalObject setRegularAttribute:]):
+        (-[DOMTestGlobalObject enabledAtRuntimeAttribute]):
+        (-[DOMTestGlobalObject setEnabledAtRuntimeAttribute:]):
+        (-[DOMTestGlobalObject regularOperation:]):
+        (-[DOMTestGlobalObject enabledAtRuntimeOperation:]):
+        (core):
+        (kit):
+        * bindings/scripts/test/ObjC/DOMTestGlobalObjectInternal.h: Added.
+        * bindings/scripts/test/TestGlobalObject.idl: Added.
+
</ins><span class="cx"> 2016-04-06  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Update IndexedDB feature status to the much more correct &quot;In Development&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (199102 => 199103)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-06 16:38:41 UTC (rev 199102)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-06 17:33:57 UTC (rev 199103)
</span><span class="lines">@@ -378,7 +378,7 @@
</span><span class="cx"> sub IsDOMGlobalObject
</span><span class="cx"> {
</span><span class="cx">     my $interface = shift;
</span><del>-    return $interface-&gt;name eq &quot;DOMWindow&quot; || $codeGenerator-&gt;InheritsInterface($interface, &quot;WorkerGlobalScope&quot;);
</del><ins>+    return $interface-&gt;name eq &quot;DOMWindow&quot; || $codeGenerator-&gt;InheritsInterface($interface, &quot;WorkerGlobalScope&quot;) || $interface-&gt;name eq &quot;TestGlobalObject&quot;;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GenerateGetOwnPropertySlotBody
</span><span class="lines">@@ -721,11 +721,11 @@
</span><span class="cx">     my $interface = shift;
</span><span class="cx">     my $function = shift;
</span><span class="cx"> 
</span><del>-    # FIXME: The bindings generator does not support putting runtime-enabled on the instance yet (except for Window).
-    return 0 if $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;EnabledAtRuntime&quot;} &amp;&amp; $interface-&gt;name ne &quot;DOMWindow&quot;;
-
</del><span class="cx">     return 1 if IsDOMGlobalObject($interface);
</span><span class="cx"> 
</span><ins>+    # FIXME: The bindings generator does not support putting runtime-enabled on the instance yet (except for global objects).
+    return 0 if $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;EnabledAtRuntime&quot;};
+
</ins><span class="cx">     # [Unforgeable] operations should be on the instance.
</span><span class="cx">     # https://heycam.github.io/webidl/#Unforgeable
</span><span class="cx">     return 1 if IsUnforgeable($interface, $function);
</span><span class="lines">@@ -1247,7 +1247,6 @@
</span><span class="cx">     # Constructor
</span><span class="cx">     if ($interfaceName eq &quot;DOMWindow&quot;) {
</span><span class="cx">         push(@headerContent, &quot;    $className(JSC::VM&amp;, JSC::Structure*, Ref&lt;$implType&gt;&amp;&amp;, JSDOMWindowShell*);\n&quot;);
</span><del>-        push(@headerContent, &quot;    void finishCreation(JSC::VM&amp;, JSDOMWindowShell*);\n&quot;);
</del><span class="cx">     } elsif ($codeGenerator-&gt;InheritsInterface($interface, &quot;WorkerGlobalScope&quot;)) {
</span><span class="cx">         push(@headerContent, &quot;    $className(JSC::VM&amp;, JSC::Structure*, Ref&lt;$implType&gt;&amp;&amp;);\n&quot;);
</span><span class="cx">     } elsif (!NeedsImplementationClass($interface)) {
</span><span class="lines">@@ -1261,6 +1260,14 @@
</span><span class="cx">         push(@headerContent, &quot;    }\n\n&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if (IsDOMGlobalObject($interface)) {
+        if ($interfaceName eq &quot;DOMWindow&quot;) {
+            push(@headerContent, &quot;    void finishCreation(JSC::VM&amp;, JSDOMWindowShell*);\n&quot;);
+        } else {
+            push(@headerContent, &quot;    void finishCreation(JSC::VM&amp;);\n&quot;);
+        }
+    }
+
</ins><span class="cx">     # Index setter
</span><span class="cx">     if ($interface-&gt;extendedAttributes-&gt;{&quot;CustomIndexedSetter&quot;}) {
</span><span class="cx">         push(@headerContent, &quot;    void indexSetter(JSC::ExecState*, unsigned index, JSC::JSValue);\n&quot;);
</span><span class="lines">@@ -1411,8 +1418,8 @@
</span><span class="cx">         next if ($attribute-&gt;isStatic);
</span><span class="cx">         next if AttributeShouldBeOnInstance($interface, $attribute) != $isInstance;
</span><span class="cx"> 
</span><del>-        # DOMWindow adds RuntimeEnabled attributes after creation so do not add them to the static table.
-        if ($interfaceName eq &quot;DOMWindow&quot; &amp;&amp; $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;EnabledAtRuntime&quot;}) {
</del><ins>+        # Global objects add RuntimeEnabled attributes after creation so do not add them to the static table.
+        if (IsDOMGlobalObject($interface) &amp;&amp; $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;EnabledAtRuntime&quot;}) {
</ins><span class="cx">             $propertyCount -= 1;
</span><span class="cx">             next;
</span><span class="cx">         }
</span><span class="lines">@@ -1448,8 +1455,8 @@
</span><span class="cx">         next if OperationShouldBeOnInstance($interface, $function) != $isInstance;
</span><span class="cx">         next if $function-&gt;signature-&gt;name eq &quot;[Symbol.Iterator]&quot;;
</span><span class="cx"> 
</span><del>-        # DOMWindow adds RuntimeEnabled operations after creation so do not add them to the static table.
-        if ($interfaceName eq &quot;DOMWindow&quot; &amp;&amp; $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;EnabledAtRuntime&quot;}) {
</del><ins>+        # Global objects add RuntimeEnabled operations after creation so do not add them to the static table.
+        if (IsDOMGlobalObject($interface) &amp;&amp; $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;EnabledAtRuntime&quot;}) {
</ins><span class="cx">             $propertyCount -= 1;
</span><span class="cx">             next;
</span><span class="cx">         }
</span><span class="lines">@@ -1472,7 +1479,7 @@
</span><span class="cx"> 
</span><span class="cx">         if ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;EnabledAtRuntime&quot;}) {
</span><span class="cx">             if ($isInstance) {
</span><del>-                die &quot;We currently do not support [EnabledAtRuntime] operations on the instance.&quot;;
</del><ins>+                die &quot;We currently do not support [EnabledAtRuntime] operations on the instance (except for global objects).&quot;;
</ins><span class="cx">             } else {
</span><span class="cx">                 push(@$runtimeEnabledFunctions, $function);
</span><span class="cx">             }
</span><span class="lines">@@ -2197,11 +2204,33 @@
</span><span class="cx">         push(@implContent, &quot;    : $parentClassName(vm, structure, WTFMove(impl), shell)\n&quot;);
</span><span class="cx">         push(@implContent, &quot;{\n&quot;);
</span><span class="cx">         push(@implContent, &quot;}\n\n&quot;);
</span><ins>+    } elsif ($codeGenerator-&gt;InheritsInterface($interface, &quot;WorkerGlobalScope&quot;)) {
+        AddIncludesForTypeInImpl($interfaceName);
+        push(@implContent, &quot;${className}::$className(VM&amp; vm, Structure* structure, Ref&lt;$implType&gt;&amp;&amp; impl)\n&quot;);
+        push(@implContent, &quot;    : $parentClassName(vm, structure, WTFMove(impl))\n&quot;);
+        push(@implContent, &quot;{\n&quot;);
+        push(@implContent, &quot;}\n\n&quot;);
+    } elsif (!NeedsImplementationClass($interface)) {
+        push(@implContent, &quot;${className}::$className(Structure* structure, JSDOMGlobalObject&amp; globalObject)\n&quot;);
+        push(@implContent, &quot;    : $parentClassName(structure, globalObject) { }\n\n&quot;);
+    } else {
+        push(@implContent, &quot;${className}::$className(Structure* structure, JSDOMGlobalObject&amp; globalObject, Ref&lt;$implType&gt;&amp;&amp; impl)\n&quot;);
+        push(@implContent, &quot;    : $parentClassName(structure, globalObject, WTFMove(impl))\n&quot;);
+        push(@implContent, &quot;{\n&quot;);
+        push(@implContent, &quot;}\n\n&quot;);
+    }
</ins><span class="cx"> 
</span><del>-        push(@implContent, &quot;void ${className}::finishCreation(VM&amp; vm, JSDOMWindowShell* shell)\n&quot;);
-        push(@implContent, &quot;{\n&quot;);
-        push(@implContent, &quot;    Base::finishCreation(vm, shell);\n\n&quot;);
-        # Support for RuntimeEnabled attributes on DOMWindow.
</del><ins>+    if (IsDOMGlobalObject($interface)) {
+        if ($interfaceName eq &quot;DOMWindow&quot;) {
+            push(@implContent, &quot;void ${className}::finishCreation(VM&amp; vm, JSDOMWindowShell* shell)\n&quot;);
+            push(@implContent, &quot;{\n&quot;);
+            push(@implContent, &quot;    Base::finishCreation(vm, shell);\n\n&quot;);
+        } else {
+            push(@implContent, &quot;void ${className}::finishCreation(VM&amp; vm)\n&quot;);
+            push(@implContent, &quot;{\n&quot;);
+            push(@implContent, &quot;    Base::finishCreation(vm);\n\n&quot;);
+        }
+        # Support for RuntimeEnabled attributes on global objects.
</ins><span class="cx">         foreach my $attribute (@{$interface-&gt;attributes}) {
</span><span class="cx">             next unless $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;EnabledAtRuntime&quot;};
</span><span class="cx"> 
</span><span class="lines">@@ -2219,7 +2248,7 @@
</span><span class="cx">             push(@implContent, &quot;    }\n&quot;);
</span><span class="cx">             push(@implContent, &quot;#endif\n&quot;) if $conditionalString;
</span><span class="cx">         }
</span><del>-        # Support for RuntimeEnabled operations on DOMWindow.
</del><ins>+        # Support for RuntimeEnabled operations on global objects.
</ins><span class="cx">         foreach my $function (@{$interface-&gt;functions}) {
</span><span class="cx">             next unless $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;EnabledAtRuntime&quot;};
</span><span class="cx">             next if $function-&gt;{overloadIndex} &amp;&amp; $function-&gt;{overloadIndex} &gt; 1;
</span><span class="lines">@@ -2237,23 +2266,7 @@
</span><span class="cx">             push(@implContent, &quot;#endif\n&quot;) if $conditionalString;
</span><span class="cx">         }
</span><span class="cx">         push(@implContent, &quot;}\n\n&quot;);
</span><del>-    } elsif ($codeGenerator-&gt;InheritsInterface($interface, &quot;WorkerGlobalScope&quot;)) {
-        AddIncludesForTypeInImpl($interfaceName);
-        push(@implContent, &quot;${className}::$className(VM&amp; vm, Structure* structure, Ref&lt;$implType&gt;&amp;&amp; impl)\n&quot;);
-        push(@implContent, &quot;    : $parentClassName(vm, structure, WTFMove(impl))\n&quot;);
-        push(@implContent, &quot;{\n&quot;);
-        push(@implContent, &quot;}\n\n&quot;);
-    } elsif (!NeedsImplementationClass($interface)) {
-        push(@implContent, &quot;${className}::$className(Structure* structure, JSDOMGlobalObject&amp; globalObject)\n&quot;);
-        push(@implContent, &quot;    : $parentClassName(structure, globalObject) { }\n\n&quot;);
</del><span class="cx">     } else {
</span><del>-        push(@implContent, &quot;${className}::$className(Structure* structure, JSDOMGlobalObject&amp; globalObject, Ref&lt;$implType&gt;&amp;&amp; impl)\n&quot;);
-        push(@implContent, &quot;    : $parentClassName(structure, globalObject, WTFMove(impl))\n&quot;);
-        push(@implContent, &quot;{\n&quot;);
-        push(@implContent, &quot;}\n\n&quot;);
-    }
-
-    unless (IsDOMGlobalObject($interface)) {
</del><span class="cx">         push(@implContent, &quot;JSObject* ${className}::createPrototype(VM&amp; vm, JSGlobalObject* globalObject)\n&quot;);
</span><span class="cx">         push(@implContent, &quot;{\n&quot;);
</span><span class="cx">         if ($hasParent &amp;&amp; $parentClassName ne &quot;JSC::DOMNodeFilter&quot;) {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestGlobalObjectcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.cpp (0 => 199103)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.cpp        2016-04-06 17:33:57 UTC (rev 199103)
</span><span class="lines">@@ -0,0 +1,257 @@
</span><ins>+/*
+ *  This file is part of the WebKit open source project.
+ *  This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebKitDOMTestGlobalObject.h&quot;
+
+#include &quot;CSSImportRule.h&quot;
+#include &quot;DOMObjectCache.h&quot;
+#include &quot;Document.h&quot;
+#include &quot;ExceptionCode.h&quot;
+#include &quot;ExceptionCodeDescription.h&quot;
+#include &quot;JSMainThreadExecState.h&quot;
+#include &quot;WebKitDOMPrivate.h&quot;
+#include &quot;WebKitDOMTestGlobalObjectPrivate.h&quot;
+#include &quot;gobject/ConvertToUTF8String.h&quot;
+#include &lt;wtf/GetPtr.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+#define WEBKIT_DOM_TEST_GLOBAL_OBJECT_GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE(obj, WEBKIT_DOM_TYPE_TEST_GLOBAL_OBJECT, WebKitDOMTestGlobalObjectPrivate)
+
+typedef struct _WebKitDOMTestGlobalObjectPrivate {
+    RefPtr&lt;WebCore::TestGlobalObject&gt; coreObject;
+} WebKitDOMTestGlobalObjectPrivate;
+
+namespace WebKit {
+
+WebKitDOMTestGlobalObject* kit(WebCore::TestGlobalObject* obj)
+{
+    if (!obj)
+        return 0;
+
+    if (gpointer ret = DOMObjectCache::get(obj))
+        return WEBKIT_DOM_TEST_GLOBAL_OBJECT(ret);
+
+    return wrapTestGlobalObject(obj);
+}
+
+WebCore::TestGlobalObject* core(WebKitDOMTestGlobalObject* request)
+{
+    return request ? static_cast&lt;WebCore::TestGlobalObject*&gt;(WEBKIT_DOM_OBJECT(request)-&gt;coreObject) : 0;
+}
+
+WebKitDOMTestGlobalObject* wrapTestGlobalObject(WebCore::TestGlobalObject* coreObject)
+{
+    ASSERT(coreObject);
+    return WEBKIT_DOM_TEST_GLOBAL_OBJECT(g_object_new(WEBKIT_DOM_TYPE_TEST_GLOBAL_OBJECT, &quot;core-object&quot;, coreObject, nullptr));
+}
+
+} // namespace WebKit
+
+G_DEFINE_TYPE(WebKitDOMTestGlobalObject, webkit_dom_test_global_object, WEBKIT_DOM_TYPE_OBJECT)
+
+enum {
+    PROP_0,
+    PROP_REGULAR_ATTRIBUTE,
+    PROP_ENABLED_AT_RUNTIME_ATTRIBUTE,
+};
+
+static void webkit_dom_test_global_object_finalize(GObject* object)
+{
+    WebKitDOMTestGlobalObjectPrivate* priv = WEBKIT_DOM_TEST_GLOBAL_OBJECT_GET_PRIVATE(object);
+
+    WebKit::DOMObjectCache::forget(priv-&gt;coreObject.get());
+
+    priv-&gt;~WebKitDOMTestGlobalObjectPrivate();
+    G_OBJECT_CLASS(webkit_dom_test_global_object_parent_class)-&gt;finalize(object);
+}
+
+static void webkit_dom_test_global_object_set_property(GObject* object, guint propertyId, const GValue* value, GParamSpec* pspec)
+{
+    WebKitDOMTestGlobalObject* self = WEBKIT_DOM_TEST_GLOBAL_OBJECT(object);
+
+    switch (propertyId) {
+    case PROP_REGULAR_ATTRIBUTE:
+        webkit_dom_test_global_object_set_regular_attribute(self, g_value_get_string(value));
+        break;
+    case PROP_ENABLED_AT_RUNTIME_ATTRIBUTE:
+        webkit_dom_test_global_object_set_enabled_at_runtime_attribute(self, g_value_get_string(value));
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec);
+        break;
+    }
+}
+
+static void webkit_dom_test_global_object_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec)
+{
+    WebKitDOMTestGlobalObject* self = WEBKIT_DOM_TEST_GLOBAL_OBJECT(object);
+
+    switch (propertyId) {
+    case PROP_REGULAR_ATTRIBUTE:
+        g_value_take_string(value, webkit_dom_test_global_object_get_regular_attribute(self));
+        break;
+    case PROP_ENABLED_AT_RUNTIME_ATTRIBUTE:
+        g_value_take_string(value, webkit_dom_test_global_object_get_enabled_at_runtime_attribute(self));
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec);
+        break;
+    }
+}
+
+static GObject* webkit_dom_test_global_object_constructor(GType type, guint constructPropertiesCount, GObjectConstructParam* constructProperties)
+{
+    GObject* object = G_OBJECT_CLASS(webkit_dom_test_global_object_parent_class)-&gt;constructor(type, constructPropertiesCount, constructProperties);
+
+    WebKitDOMTestGlobalObjectPrivate* priv = WEBKIT_DOM_TEST_GLOBAL_OBJECT_GET_PRIVATE(object);
+    priv-&gt;coreObject = static_cast&lt;WebCore::TestGlobalObject*&gt;(WEBKIT_DOM_OBJECT(object)-&gt;coreObject);
+    WebKit::DOMObjectCache::put(priv-&gt;coreObject.get(), object);
+
+    return object;
+}
+
+static void webkit_dom_test_global_object_class_init(WebKitDOMTestGlobalObjectClass* requestClass)
+{
+    GObjectClass* gobjectClass = G_OBJECT_CLASS(requestClass);
+    g_type_class_add_private(gobjectClass, sizeof(WebKitDOMTestGlobalObjectPrivate));
+    gobjectClass-&gt;constructor = webkit_dom_test_global_object_constructor;
+    gobjectClass-&gt;finalize = webkit_dom_test_global_object_finalize;
+    gobjectClass-&gt;set_property = webkit_dom_test_global_object_set_property;
+    gobjectClass-&gt;get_property = webkit_dom_test_global_object_get_property;
+
+    g_object_class_install_property(
+        gobjectClass,
+        PROP_REGULAR_ATTRIBUTE,
+        g_param_spec_string(
+            &quot;regular-attribute&quot;,
+            &quot;TestGlobalObject:regular-attribute&quot;,
+            &quot;read-write gchar* TestGlobalObject:regular-attribute&quot;,
+            &quot;&quot;,
+            WEBKIT_PARAM_READWRITE));
+
+    g_object_class_install_property(
+        gobjectClass,
+        PROP_ENABLED_AT_RUNTIME_ATTRIBUTE,
+        g_param_spec_string(
+            &quot;enabled-at-runtime-attribute&quot;,
+            &quot;TestGlobalObject:enabled-at-runtime-attribute&quot;,
+            &quot;read-write gchar* TestGlobalObject:enabled-at-runtime-attribute&quot;,
+            &quot;&quot;,
+            WEBKIT_PARAM_READWRITE));
+
+}
+
+static void webkit_dom_test_global_object_init(WebKitDOMTestGlobalObject* request)
+{
+    WebKitDOMTestGlobalObjectPrivate* priv = WEBKIT_DOM_TEST_GLOBAL_OBJECT_GET_PRIVATE(request);
+    new (priv) WebKitDOMTestGlobalObjectPrivate();
+}
+
+void webkit_dom_test_global_object_regular_operation(WebKitDOMTestGlobalObject* self, const gchar* testParam)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_GLOBAL_OBJECT(self));
+    g_return_if_fail(testParam);
+    WebCore::TestGlobalObject* item = WebKit::core(self);
+    WTF::String convertedTestParam = WTF::String::fromUTF8(testParam);
+    item-&gt;regularOperation(convertedTestParam);
+}
+
+void webkit_dom_test_global_object_enabled_at_runtime_operation(WebKitDOMTestGlobalObject* self, const gchar* testParam)
+{
+#if ENABLE(TEST_FEATURE)
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_GLOBAL_OBJECT(self));
+    g_return_if_fail(testParam);
+    WebCore::TestGlobalObject* item = WebKit::core(self);
+    WTF::String convertedTestParam = WTF::String::fromUTF8(testParam);
+    item-&gt;enabledAtRuntimeOperation(convertedTestParam);
+#else
+    UNUSED_PARAM(self);
+    UNUSED_PARAM(testParam);
+    WEBKIT_WARN_FEATURE_NOT_PRESENT(&quot;Test Feature&quot;)
+#endif /* ENABLE(TEST_FEATURE) */
+}
+
+void webkit_dom_test_global_object_enabled_at_runtime_operation(WebKitDOMTestGlobalObject* self, glong testParam)
+{
+#if ENABLE(TEST_FEATURE)
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_GLOBAL_OBJECT(self));
+    WebCore::TestGlobalObject* item = WebKit::core(self);
+    item-&gt;enabledAtRuntimeOperation(testParam);
+#else
+    UNUSED_PARAM(self);
+    UNUSED_PARAM(testParam);
+    WEBKIT_WARN_FEATURE_NOT_PRESENT(&quot;Test Feature&quot;)
+#endif /* ENABLE(TEST_FEATURE) */
+}
+
+gchar* webkit_dom_test_global_object_get_regular_attribute(WebKitDOMTestGlobalObject* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_GLOBAL_OBJECT(self), 0);
+    WebCore::TestGlobalObject* item = WebKit::core(self);
+    gchar* result = convertToUTF8String(item-&gt;regularAttribute());
+    return result;
+}
+
+void webkit_dom_test_global_object_set_regular_attribute(WebKitDOMTestGlobalObject* self, const gchar* value)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_GLOBAL_OBJECT(self));
+    g_return_if_fail(value);
+    WebCore::TestGlobalObject* item = WebKit::core(self);
+    WTF::String convertedValue = WTF::String::fromUTF8(value);
+    item-&gt;setRegularAttribute(convertedValue);
+}
+
+gchar* webkit_dom_test_global_object_get_enabled_at_runtime_attribute(WebKitDOMTestGlobalObject* self)
+{
+#if ENABLE(TEST_FEATURE)
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_GLOBAL_OBJECT(self), 0);
+    WebCore::TestGlobalObject* item = WebKit::core(self);
+    gchar* result = convertToUTF8String(item-&gt;enabledAtRuntimeAttribute());
+    return result;
+#else
+    UNUSED_PARAM(self);
+    WEBKIT_WARN_FEATURE_NOT_PRESENT(&quot;Test Feature&quot;)
+    return 0;
+#endif /* ENABLE(TEST_FEATURE) */
+}
+
+void webkit_dom_test_global_object_set_enabled_at_runtime_attribute(WebKitDOMTestGlobalObject* self, const gchar* value)
+{
+#if ENABLE(TEST_FEATURE)
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_GLOBAL_OBJECT(self));
+    g_return_if_fail(value);
+    WebCore::TestGlobalObject* item = WebKit::core(self);
+    WTF::String convertedValue = WTF::String::fromUTF8(value);
+    item-&gt;setEnabledAtRuntimeAttribute(convertedValue);
+#else
+    UNUSED_PARAM(self);
+    UNUSED_PARAM(value);
+    WEBKIT_WARN_FEATURE_NOT_PRESENT(&quot;Test Feature&quot;)
+#endif /* ENABLE(TEST_FEATURE) */
+}
+
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestGlobalObjecth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.h (0 => 199103)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.h        2016-04-06 17:33:57 UTC (rev 199103)
</span><span class="lines">@@ -0,0 +1,125 @@
</span><ins>+/*
+ *  This file is part of the WebKit open source project.
+ *  This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ */
+
+#ifndef WebKitDOMTestGlobalObject_h
+#define WebKitDOMTestGlobalObject_h
+
+#ifdef WEBKIT_DOM_USE_UNSTABLE_API
+
+#include &lt;glib-object.h&gt;
+#include &lt;webkitdom/WebKitDOMObject.h&gt;
+#include &lt;webkitdom/webkitdomdefines-unstable.h&gt;
+
+G_BEGIN_DECLS
+
+#define WEBKIT_DOM_TYPE_TEST_GLOBAL_OBJECT            (webkit_dom_test_global_object_get_type())
+#define WEBKIT_DOM_TEST_GLOBAL_OBJECT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_DOM_TYPE_TEST_GLOBAL_OBJECT, WebKitDOMTestGlobalObject))
+#define WEBKIT_DOM_TEST_GLOBAL_OBJECT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_DOM_TYPE_TEST_GLOBAL_OBJECT, WebKitDOMTestGlobalObjectClass)
+#define WEBKIT_DOM_IS_TEST_GLOBAL_OBJECT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_DOM_TYPE_TEST_GLOBAL_OBJECT))
+#define WEBKIT_DOM_IS_TEST_GLOBAL_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_DOM_TYPE_TEST_GLOBAL_OBJECT))
+#define WEBKIT_DOM_TEST_GLOBAL_OBJECT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_DOM_TYPE_TEST_GLOBAL_OBJECT, WebKitDOMTestGlobalObjectClass))
+
+struct _WebKitDOMTestGlobalObject {
+    WebKitDOMObject parent_instance;
+};
+
+struct _WebKitDOMTestGlobalObjectClass {
+    WebKitDOMObjectClass parent_class;
+};
+
+WEBKIT_API GType
+webkit_dom_test_global_object_get_type(void);
+
+/**
+ * webkit_dom_test_global_object_regular_operation:
+ * @self: A #WebKitDOMTestGlobalObject
+ * @testParam: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_global_object_regular_operation(WebKitDOMTestGlobalObject* self, const gchar* testParam);
+
+/**
+ * webkit_dom_test_global_object_enabled_at_runtime_operation:
+ * @self: A #WebKitDOMTestGlobalObject
+ * @testParam: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_global_object_enabled_at_runtime_operation(WebKitDOMTestGlobalObject* self, const gchar* testParam);
+
+/**
+ * webkit_dom_test_global_object_enabled_at_runtime_operation:
+ * @self: A #WebKitDOMTestGlobalObject
+ * @testParam: A #glong
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_global_object_enabled_at_runtime_operation(WebKitDOMTestGlobalObject* self, glong testParam);
+
+/**
+ * webkit_dom_test_global_object_get_regular_attribute:
+ * @self: A #WebKitDOMTestGlobalObject
+ *
+ * Returns: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API gchar*
+webkit_dom_test_global_object_get_regular_attribute(WebKitDOMTestGlobalObject* self);
+
+/**
+ * webkit_dom_test_global_object_set_regular_attribute:
+ * @self: A #WebKitDOMTestGlobalObject
+ * @value: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_global_object_set_regular_attribute(WebKitDOMTestGlobalObject* self, const gchar* value);
+
+/**
+ * webkit_dom_test_global_object_get_enabled_at_runtime_attribute:
+ * @self: A #WebKitDOMTestGlobalObject
+ *
+ * Returns: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API gchar*
+webkit_dom_test_global_object_get_enabled_at_runtime_attribute(WebKitDOMTestGlobalObject* self);
+
+/**
+ * webkit_dom_test_global_object_set_enabled_at_runtime_attribute:
+ * @self: A #WebKitDOMTestGlobalObject
+ * @value: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_global_object_set_enabled_at_runtime_attribute(WebKitDOMTestGlobalObject* self, const gchar* value);
+
+G_END_DECLS
+
+#endif /* WEBKIT_DOM_USE_UNSTABLE_API */
+#endif /* WebKitDOMTestGlobalObject_h */
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestGlobalObjectPrivateh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGlobalObjectPrivate.h (0 => 199103)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGlobalObjectPrivate.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGlobalObjectPrivate.h        2016-04-06 17:33:57 UTC (rev 199103)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+/*
+ *  This file is part of the WebKit open source project.
+ *  This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ */
+
+#ifndef WebKitDOMTestGlobalObjectPrivate_h
+#define WebKitDOMTestGlobalObjectPrivate_h
+
+#include &quot;TestGlobalObject.h&quot;
+#include &lt;webkitdom/WebKitDOMTestGlobalObject.h&gt;
+
+namespace WebKit {
+WebKitDOMTestGlobalObject* wrapTestGlobalObject(WebCore::TestGlobalObject*);
+WebKitDOMTestGlobalObject* kit(WebCore::TestGlobalObject*);
+WebCore::TestGlobalObject* core(WebKitDOMTestGlobalObject*);
+} // namespace WebKit
+
+#endif /* WebKitDOMTestGlobalObjectPrivate_h */
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (0 => 199103)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-04-06 17:33:57 UTC (rev 199103)
</span><span class="lines">@@ -0,0 +1,389 @@
</span><ins>+/*
+    This file is part of the WebKit open source project.
+    This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include &quot;config.h&quot;
+#include &quot;JSTestGlobalObject.h&quot;
+
+#include &quot;ExceptionCode.h&quot;
+#include &quot;JSDOMBinding.h&quot;
+#include &quot;JSDOMConstructor.h&quot;
+#include &quot;RuntimeEnabledFeatures.h&quot;
+#include &quot;URL.h&quot;
+#include &lt;runtime/Error.h&gt;
+#include &lt;runtime/FunctionPrototype.h&gt;
+#include &lt;runtime/JSString.h&gt;
+#include &lt;wtf/GetPtr.h&gt;
+
+using namespace JSC;
+
+namespace WebCore {
+
+// Functions
+
+JSC::EncodedJSValue JSC_HOST_CALL jsTestGlobalObjectInstanceFunctionRegularOperation(JSC::ExecState*);
+#if ENABLE(TEST_FEATURE)
+JSC::EncodedJSValue JSC_HOST_CALL jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation(JSC::ExecState*);
+#endif
+
+// Attributes
+
+JSC::EncodedJSValue jsTestGlobalObjectRegularAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestGlobalObjectRegularAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
+#if ENABLE(TEST_FEATURE)
+JSC::EncodedJSValue jsTestGlobalObjectEnabledAtRuntimeAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestGlobalObjectEnabledAtRuntimeAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
+#endif
+JSC::EncodedJSValue jsTestGlobalObjectConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestGlobalObjectConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
+
+typedef JSDOMConstructorNotConstructable&lt;JSTestGlobalObject&gt; JSTestGlobalObjectConstructor;
+
+/* Hash table */
+
+static const struct CompactHashIndex JSTestGlobalObjectTableIndex[8] = {
+    { -1, -1 },
+    { 1, -1 },
+    { -1, -1 },
+    { 0, -1 },
+    { -1, -1 },
+    { -1, -1 },
+    { -1, -1 },
+    { -1, -1 },
+};
+
+
+static const HashTableValue JSTestGlobalObjectTableValues[] =
+{
+    { &quot;regularAttribute&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestGlobalObjectRegularAttribute), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestGlobalObjectRegularAttribute) } },
+    { &quot;regularOperation&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestGlobalObjectInstanceFunctionRegularOperation), (intptr_t) (1) } },
+};
+
+static const HashTable JSTestGlobalObjectTable = { 2, 7, true, JSTestGlobalObjectTableValues, JSTestGlobalObjectTableIndex };
+template&lt;&gt; JSValue JSTestGlobalObjectConstructor::prototypeForStructure(JSC::VM&amp; vm, const JSDOMGlobalObject&amp; globalObject)
+{
+    UNUSED_PARAM(vm);
+    return globalObject.functionPrototype();
+}
+
+template&lt;&gt; void JSTestGlobalObjectConstructor::initializeProperties(VM&amp; vm, JSDOMGlobalObject&amp; globalObject)
+{
+    putDirect(vm, vm.propertyNames-&gt;prototype, globalObject.getPrototypeDirect(), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames-&gt;name, jsNontrivialString(&amp;vm, String(ASCIILiteral(&quot;TestGlobalObject&quot;))), ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames-&gt;length, jsNumber(0), ReadOnly | DontEnum);
+}
+
+template&lt;&gt; const ClassInfo JSTestGlobalObjectConstructor::s_info = { &quot;TestGlobalObject&quot;, &amp;Base::s_info, 0, CREATE_METHOD_TABLE(JSTestGlobalObjectConstructor) };
+
+/* Hash table for prototype */
+
+static const struct CompactHashIndex JSTestGlobalObjectPrototypeTableIndex[2] = {
+    { -1, -1 },
+    { 0, -1 },
+};
+
+
+static const HashTableValue JSTestGlobalObjectPrototypeTableValues[] =
+{
+    { &quot;constructor&quot;, DontEnum, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestGlobalObjectConstructor), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestGlobalObjectConstructor) } },
+};
+
+static const HashTable JSTestGlobalObjectPrototypeTable = { 1, 1, true, JSTestGlobalObjectPrototypeTableValues, JSTestGlobalObjectPrototypeTableIndex };
+const ClassInfo JSTestGlobalObjectPrototype::s_info = { &quot;TestGlobalObjectPrototype&quot;, &amp;Base::s_info, &amp;JSTestGlobalObjectPrototypeTable, CREATE_METHOD_TABLE(JSTestGlobalObjectPrototype) };
+
+bool JSTestGlobalObjectPrototype::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot&amp; slot)
+{
+    VM&amp; vm = state-&gt;vm();
+    UNUSED_PARAM(vm);
+    auto* thisObject = jsCast&lt;JSTestGlobalObjectPrototype*&gt;(object);
+    return getStaticPropertySlot&lt;JSTestGlobalObjectPrototype, JSObject&gt;(state, JSTestGlobalObjectPrototypeTable, thisObject, propertyName, slot);
+}
+
+const ClassInfo JSTestGlobalObject::s_info = { &quot;TestGlobalObject&quot;, &amp;Base::s_info, &amp;JSTestGlobalObjectTable, CREATE_METHOD_TABLE(JSTestGlobalObject) };
+
+JSTestGlobalObject::JSTestGlobalObject(Structure* structure, JSDOMGlobalObject&amp; globalObject, Ref&lt;TestGlobalObject&gt;&amp;&amp; impl)
+    : JSDOMWrapper&lt;TestGlobalObject&gt;(structure, globalObject, WTFMove(impl))
+{
+}
+
+void JSTestGlobalObject::finishCreation(VM&amp; vm)
+{
+    Base::finishCreation(vm);
+
+#if ENABLE(TEST_FEATURE)
+    if (RuntimeEnabledFeatures::sharedFeatures().testFeatureEnabled()) {
+        auto* customGetterSetter = CustomGetterSetter::create(vm, jsTestGlobalObjectEnabledAtRuntimeAttribute, setJSTestGlobalObjectEnabledAtRuntimeAttribute);
+        putDirectCustomAccessor(vm, vm.propertyNames-&gt;enabledAtRuntimeAttribute, customGetterSetter, attributesForStructure(CustomAccessor));
+    }
+#endif
+#if ENABLE(TEST_FEATURE)
+    if (RuntimeEnabledFeatures::sharedFeatures().testFeatureEnabled())
+        putDirectNativeFunction(vm, this, vm.propertyNames-&gt;enabledAtRuntimeOperation, 1, jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation, NoIntrinsic, attributesForStructure(JSC::Function));
+#endif
+}
+
+void JSTestGlobalObject::destroy(JSC::JSCell* cell)
+{
+    JSTestGlobalObject* thisObject = static_cast&lt;JSTestGlobalObject*&gt;(cell);
+    thisObject-&gt;JSTestGlobalObject::~JSTestGlobalObject();
+}
+
+bool JSTestGlobalObject::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot&amp; slot)
+{
+    auto* thisObject = jsCast&lt;JSTestGlobalObject*&gt;(object);
+    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+    if (getStaticPropertySlot&lt;JSTestGlobalObject, Base&gt;(state, JSTestGlobalObjectTable, thisObject, propertyName, slot))
+        return true;
+    return false;
+}
+
+EncodedJSValue jsTestGlobalObjectRegularAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+    UNUSED_PARAM(state);
+    UNUSED_PARAM(thisValue);
+    JSValue decodedThisValue = JSValue::decode(thisValue);
+    auto* castedThis = jsDynamicCast&lt;JSTestGlobalObject*&gt;(decodedThisValue);
+    if (UNLIKELY(!castedThis)) {
+        return throwGetterTypeError(*state, &quot;TestGlobalObject&quot;, &quot;regularAttribute&quot;);
+    }
+    auto&amp; impl = castedThis-&gt;wrapped();
+    JSValue result = jsStringWithCache(state, impl.regularAttribute());
+    return JSValue::encode(result);
+}
+
+
+#if ENABLE(TEST_FEATURE)
+EncodedJSValue jsTestGlobalObjectEnabledAtRuntimeAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+    UNUSED_PARAM(state);
+    UNUSED_PARAM(thisValue);
+    JSValue decodedThisValue = JSValue::decode(thisValue);
+    auto* castedThis = jsDynamicCast&lt;JSTestGlobalObject*&gt;(decodedThisValue);
+    if (UNLIKELY(!castedThis)) {
+        return throwGetterTypeError(*state, &quot;TestGlobalObject&quot;, &quot;enabledAtRuntimeAttribute&quot;);
+    }
+    auto&amp; impl = castedThis-&gt;wrapped();
+    JSValue result = jsStringWithCache(state, impl.enabledAtRuntimeAttribute());
+    return JSValue::encode(result);
+}
+
+#endif
+
+EncodedJSValue jsTestGlobalObjectConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+    JSTestGlobalObjectPrototype* domObject = jsDynamicCast&lt;JSTestGlobalObjectPrototype*&gt;(JSValue::decode(thisValue));
+    if (!domObject)
+        return throwVMTypeError(state);
+    return JSValue::encode(JSTestGlobalObject::getConstructor(state-&gt;vm(), domObject-&gt;globalObject()));
+}
+
+bool setJSTestGlobalObjectConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+    JSValue value = JSValue::decode(encodedValue);
+    JSTestGlobalObjectPrototype* domObject = jsDynamicCast&lt;JSTestGlobalObjectPrototype*&gt;(JSValue::decode(thisValue));
+    if (UNLIKELY(!domObject)) {
+        throwVMTypeError(state);
+        return false;
+    }
+    // Shadowing a built-in constructor
+    return domObject-&gt;putDirect(state-&gt;vm(), state-&gt;propertyNames().constructor, value);
+}
+
+bool setJSTestGlobalObjectRegularAttribute(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+    JSValue value = JSValue::decode(encodedValue);
+    UNUSED_PARAM(thisValue);
+    JSTestGlobalObject* castedThis = jsDynamicCast&lt;JSTestGlobalObject*&gt;(JSValue::decode(thisValue));
+    if (UNLIKELY(!castedThis)) {
+        return throwSetterTypeError(*state, &quot;TestGlobalObject&quot;, &quot;regularAttribute&quot;);
+    }
+    auto&amp; impl = castedThis-&gt;wrapped();
+    String nativeValue = value.toString(state)-&gt;value(state);
+    if (UNLIKELY(state-&gt;hadException()))
+        return false;
+    impl.setRegularAttribute(nativeValue);
+    return true;
+}
+
+
+#if ENABLE(TEST_FEATURE)
+bool setJSTestGlobalObjectEnabledAtRuntimeAttribute(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+    JSValue value = JSValue::decode(encodedValue);
+    UNUSED_PARAM(thisValue);
+    JSTestGlobalObject* castedThis = jsDynamicCast&lt;JSTestGlobalObject*&gt;(JSValue::decode(thisValue));
+    if (UNLIKELY(!castedThis)) {
+        return throwSetterTypeError(*state, &quot;TestGlobalObject&quot;, &quot;enabledAtRuntimeAttribute&quot;);
+    }
+    auto&amp; impl = castedThis-&gt;wrapped();
+    String nativeValue = value.toString(state)-&gt;value(state);
+    if (UNLIKELY(state-&gt;hadException()))
+        return false;
+    impl.setEnabledAtRuntimeAttribute(nativeValue);
+    return true;
+}
+
+#endif
+
+JSValue JSTestGlobalObject::getConstructor(VM&amp; vm, const JSGlobalObject* globalObject)
+{
+    return getDOMConstructor&lt;JSTestGlobalObjectConstructor&gt;(vm, *jsCast&lt;const JSDOMGlobalObject*&gt;(globalObject));
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestGlobalObjectInstanceFunctionRegularOperation(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestGlobalObject*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestGlobalObject&quot;, &quot;regularOperation&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestGlobalObject::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
+        return throwVMError(state, createNotEnoughArgumentsError(state));
+    String testParam = state-&gt;argument(0).toString(state)-&gt;value(state);
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.regularOperation(testParam);
+    return JSValue::encode(jsUndefined());
+}
+
+#if ENABLE(TEST_FEATURE)
+static inline EncodedJSValue jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestGlobalObject*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestGlobalObject&quot;, &quot;enabledAtRuntimeOperation&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestGlobalObject::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
+        return throwVMError(state, createNotEnoughArgumentsError(state));
+    String testParam = state-&gt;argument(0).toString(state)-&gt;value(state);
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.enabledAtRuntimeOperation(testParam);
+    return JSValue::encode(jsUndefined());
+}
+
+#endif
+
+#if ENABLE(TEST_FEATURE)
+static inline EncodedJSValue jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestGlobalObject*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestGlobalObject&quot;, &quot;enabledAtRuntimeOperation&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestGlobalObject::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
+        return throwVMError(state, createNotEnoughArgumentsError(state));
+    int testParam = toInt32(state, state-&gt;argument(0), NormalConversion);
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.enabledAtRuntimeOperation(testParam);
+    return JSValue::encode(jsUndefined());
+}
+
+#endif
+
+EncodedJSValue JSC_HOST_CALL jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation(ExecState* state)
+{
+    size_t argsCount = std::min&lt;size_t&gt;(1, state-&gt;argumentCount());
+#if ENABLE(TEST_FEATURE)
+    if (argsCount == 1)
+        return jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1(state);
+#endif
+
+#if ENABLE(TEST_FEATURE)
+    if (argsCount == 1)
+        return jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2(state);
+#endif
+
+    if (argsCount &lt; 1)
+        return throwVMError(state, createNotEnoughArgumentsError(state));
+    return throwVMTypeError(state);
+}
+
+bool JSTestGlobalObjectOwner::isReachableFromOpaqueRoots(JSC::Handle&lt;JSC::Unknown&gt; handle, void*, SlotVisitor&amp; visitor)
+{
+    UNUSED_PARAM(handle);
+    UNUSED_PARAM(visitor);
+    return false;
+}
+
+void JSTestGlobalObjectOwner::finalize(JSC::Handle&lt;JSC::Unknown&gt; handle, void* context)
+{
+    auto* jsTestGlobalObject = jsCast&lt;JSTestGlobalObject*&gt;(handle.slot()-&gt;asCell());
+    auto&amp; world = *static_cast&lt;DOMWrapperWorld*&gt;(context);
+    uncacheWrapper(world, &amp;jsTestGlobalObject-&gt;wrapped(), jsTestGlobalObject);
+}
+
+#if ENABLE(BINDING_INTEGRITY)
+#if PLATFORM(WIN)
+#pragma warning(disable: 4483)
+extern &quot;C&quot; { extern void (*const __identifier(&quot;??_7TestGlobalObject@WebCore@@6B@&quot;)[])(); }
+#else
+extern &quot;C&quot; { extern void* _ZTVN7WebCore16TestGlobalObjectE[]; }
+#endif
+#endif
+
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGlobalObject* impl)
+{
+    if (!impl)
+        return jsNull();
+    return createNewWrapper&lt;JSTestGlobalObject&gt;(globalObject, impl);
+}
+
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGlobalObject* impl)
+{
+    if (!impl)
+        return jsNull();
+    if (JSValue result = getExistingWrapper&lt;JSTestGlobalObject&gt;(globalObject, impl))
+        return result;
+
+#if ENABLE(BINDING_INTEGRITY)
+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
+#if PLATFORM(WIN)
+    void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestGlobalObject@WebCore@@6B@&quot;));
+#else
+    void* expectedVTablePointer = &amp;_ZTVN7WebCore16TestGlobalObjectE[2];
+#if COMPILER(CLANG)
+    // If this fails TestGlobalObject does not have a vtable, so you need to add the
+    // ImplementationLacksVTable attribute to the interface definition
+    COMPILE_ASSERT(__is_polymorphic(TestGlobalObject), TestGlobalObject_is_not_polymorphic);
+#endif
+#endif
+    // If you hit this assertion you either have a use after free bug, or
+    // TestGlobalObject has subclasses. If TestGlobalObject has subclasses that get passed
+    // to toJS() we currently require TestGlobalObject you to opt out of binding hardening
+    // by adding the SkipVTableValidation attribute to the interface IDL definition
+    RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
+#endif
+    return createNewWrapper&lt;JSTestGlobalObject&gt;(globalObject, impl);
+}
+
+TestGlobalObject* JSTestGlobalObject::toWrapped(JSC::JSValue value)
+{
+    if (auto* wrapper = jsDynamicCast&lt;JSTestGlobalObject*&gt;(value))
+        return &amp;wrapper-&gt;wrapped();
+    return nullptr;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjecth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h (0 => 199103)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h        2016-04-06 17:33:57 UTC (rev 199103)
</span><span class="lines">@@ -0,0 +1,123 @@
</span><ins>+/*
+    This file is part of the WebKit open source project.
+    This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef JSTestGlobalObject_h
+#define JSTestGlobalObject_h
+
+#include &quot;JSDOMWrapper.h&quot;
+#include &quot;TestGlobalObject.h&quot;
+#include &lt;wtf/NeverDestroyed.h&gt;
+
+namespace WebCore {
+
+class TestGlobalObject;
+
+class JSTestGlobalObject : public JSDOMWrapper&lt;TestGlobalObject&gt; {
+public:
+    typedef JSDOMWrapper&lt;TestGlobalObject&gt; Base;
+    static JSTestGlobalObject* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref&lt;TestGlobalObject&gt;&amp;&amp; impl)
+    {
+        JSTestGlobalObject* ptr = new (NotNull, JSC::allocateCell&lt;JSTestGlobalObject&gt;(globalObject-&gt;vm().heap)) JSTestGlobalObject(structure, *globalObject, WTFMove(impl));
+        ptr-&gt;finishCreation(globalObject-&gt;vm());
+        return ptr;
+    }
+
+    static const bool needsDestruction = false;
+
+    static const bool hasStaticPropertyTable = true;
+
+    static TestGlobalObject* toWrapped(JSC::JSValue);
+    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&amp;);
+    static void destroy(JSC::JSCell*);
+
+    DECLARE_INFO;
+
+    static JSC::Structure* createStructure(JSC::VM&amp; vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+    {
+        return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::GlobalObjectType, StructureFlags), info());
+    }
+
+    static JSC::JSValue getConstructor(JSC::VM&amp;, const JSC::JSGlobalObject*);
+public:
+    static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
+protected:
+    JSTestGlobalObject(JSC::Structure*, JSDOMGlobalObject&amp;, Ref&lt;TestGlobalObject&gt;&amp;&amp;);
+
+    void finishCreation(JSC::VM&amp; vm)
+    {
+        Base::finishCreation(vm);
+        ASSERT(inherits(info()));
+    }
+
+    void finishCreation(JSC::VM&amp;);
+};
+
+class JSTestGlobalObjectOwner : public JSC::WeakHandleOwner {
+public:
+    virtual bool isReachableFromOpaqueRoots(JSC::Handle&lt;JSC::Unknown&gt;, void* context, JSC::SlotVisitor&amp;);
+    virtual void finalize(JSC::Handle&lt;JSC::Unknown&gt;, void* context);
+};
+
+inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&amp;, TestGlobalObject*)
+{
+    static NeverDestroyed&lt;JSTestGlobalObjectOwner&gt; owner;
+    return &amp;owner.get();
+}
+
+inline void* wrapperKey(TestGlobalObject* wrappableObject)
+{
+    return wrappableObject;
+}
+
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestGlobalObject*);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestGlobalObject&amp; impl) { return toJS(state, globalObject, &amp;impl); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestGlobalObject*);
+
+class JSTestGlobalObjectPrototype : public JSC::JSNonFinalObject {
+public:
+    typedef JSC::JSNonFinalObject Base;
+    static JSTestGlobalObjectPrototype* create(JSC::VM&amp; vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+    {
+        JSTestGlobalObjectPrototype* ptr = new (NotNull, JSC::allocateCell&lt;JSTestGlobalObjectPrototype&gt;(vm.heap)) JSTestGlobalObjectPrototype(vm, globalObject, structure);
+        ptr-&gt;finishCreation(vm);
+        return ptr;
+    }
+
+    DECLARE_INFO;
+    static JSC::Structure* createStructure(JSC::VM&amp; vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+    {
+        return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+    }
+
+private:
+    JSTestGlobalObjectPrototype(JSC::VM&amp; vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+        : JSC::JSNonFinalObject(vm, structure)
+    {
+    }
+
+    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&amp;);
+public:
+    static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
+};
+
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestGlobalObjecth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObject.h (0 => 199103)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObject.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObject.h        2016-04-06 17:33:57 UTC (rev 199103)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+/*
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig &lt;sam.weinig@gmail.com&gt;
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import &lt;WebCore/DOMObject.h&gt;
+
+@class NSString;
+
+WEBKIT_CLASS_AVAILABLE_MAC(9876_5)
+WEBCORE_EXPORT @interface DOMTestGlobalObject : DOMObject
+@property (copy) NSString *regularAttribute;
+@property (copy) NSString *enabledAtRuntimeAttribute;
+
+- (void)regularOperation:(NSString *)testParam;
+@end
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestGlobalObjectmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObject.mm (0 => 199103)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObject.mm                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObject.mm        2016-04-06 17:33:57 UTC (rev 199103)
</span><span class="lines">@@ -0,0 +1,128 @@
</span><ins>+/*
+ * This file is part of the WebKit open source project.
+ * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import &quot;config.h&quot;
+#import &quot;DOMInternal.h&quot;
+
+#import &quot;DOMTestGlobalObject.h&quot;
+
+#import &quot;DOMNodeInternal.h&quot;
+#import &quot;DOMTestGlobalObjectInternal.h&quot;
+#import &quot;ExceptionHandlers.h&quot;
+#import &quot;JSMainThreadExecState.h&quot;
+#import &quot;TestGlobalObject.h&quot;
+#import &quot;ThreadCheck.h&quot;
+#import &quot;URL.h&quot;
+#import &quot;WebCoreObjCExtras.h&quot;
+#import &quot;WebScriptObjectPrivate.h&quot;
+#import &lt;wtf/GetPtr.h&gt;
+
+#define IMPL reinterpret_cast&lt;WebCore::TestGlobalObject*&gt;(_internal)
+
+@implementation DOMTestGlobalObject
+
+- (void)dealloc
+{
+    if (WebCoreObjCScheduleDeallocateOnMainThread([DOMTestGlobalObject class], self))
+        return;
+
+    if (_internal)
+        IMPL-&gt;deref();
+    [super dealloc];
+}
+
+- (NSString *)regularAttribute
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL-&gt;regularAttribute();
+}
+
+- (void)setRegularAttribute:(NSString *)newRegularAttribute
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;setRegularAttribute(newRegularAttribute);
+}
+
+#if ENABLE(TEST_FEATURE)
+- (NSString *)enabledAtRuntimeAttribute
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL-&gt;enabledAtRuntimeAttribute();
+}
+
+- (void)setEnabledAtRuntimeAttribute:(NSString *)newEnabledAtRuntimeAttribute
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;setEnabledAtRuntimeAttribute(newEnabledAtRuntimeAttribute);
+}
+#endif
+
+- (void)regularOperation:(NSString *)testParam
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;regularOperation(testParam);
+}
+
+
+#if ENABLE(TEST_FEATURE)
+- (void)enabledAtRuntimeOperation:(NSString *)testParam
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;enabledAtRuntimeOperation(testParam);
+}
+
+#endif
+
+
+#if ENABLE(TEST_FEATURE)
+- (void)enabledAtRuntimeOperation:(int)testParam
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;enabledAtRuntimeOperation(testParam);
+}
+
+#endif
+
+@end
+
+WebCore::TestGlobalObject* core(DOMTestGlobalObject *wrapper)
+{
+    return wrapper ? reinterpret_cast&lt;WebCore::TestGlobalObject*&gt;(wrapper-&gt;_internal) : 0;
+}
+
+DOMTestGlobalObject *kit(WebCore::TestGlobalObject* value)
+{
+    WebCoreThreadViolationCheckRoundOne();
+    if (!value)
+        return nil;
+    if (DOMTestGlobalObject *wrapper = getDOMWrapper(value))
+        return [[wrapper retain] autorelease];
+    DOMTestGlobalObject *wrapper = [[DOMTestGlobalObject alloc] _init];
+    wrapper-&gt;_internal = reinterpret_cast&lt;DOMObjectInternal*&gt;(value);
+    value-&gt;ref();
+    addDOMWrapper(wrapper, value);
+    return [wrapper autorelease];
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestGlobalObjectInternalh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObjectInternal.h (0 => 199103)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObjectInternal.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObjectInternal.h        2016-04-06 17:33:57 UTC (rev 199103)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * This file is part of the WebKit open source project.
+ * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import &lt;WebCore/DOMTestGlobalObject.h&gt;
+
+namespace WebCore {
+class TestGlobalObject;
+}
+
+WEBCORE_EXPORT WebCore::TestGlobalObject* core(DOMTestGlobalObject *);
+WEBCORE_EXPORT DOMTestGlobalObject *kit(WebCore::TestGlobalObject*);
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestGlobalObjectidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/TestGlobalObject.idl (0 => 199103)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestGlobalObject.idl                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/TestGlobalObject.idl        2016-04-06 17:33:57 UTC (rev 199103)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// This interface is recognized as a global object by the bindings generator.
+interface TestGlobalObject {
+    attribute DOMString regularAttribute;
+    [Conditional=TEST_FEATURE, EnabledAtRuntime=TestFeature] attribute DOMString enabledAtRuntimeAttribute;
+    void regularOperation(DOMString testParam);
+    [Conditional=TEST_FEATURE, EnabledAtRuntime=TestFeature] void enabledAtRuntimeOperation(DOMString testParam);
+    [Conditional=TEST_FEATURE, EnabledAtRuntime=TestFeature] void enabledAtRuntimeOperation(long testParam);
+};
</ins></span></pre>
</div>
</div>

</body>
</html>