<!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>[188994] 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/188994">188994</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2015-08-26 15:09:29 -0700 (Wed, 26 Aug 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Distinguish Web IDL callback interfaces from Web IDL callback functions
https://bugs.webkit.org/show_bug.cgi?id=148434

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Add isNull() convenience method on PropertyName.

* runtime/PropertyName.h:
(JSC::PropertyName::isNull):

Source/WebCore:

Distinguish Web IDL callback interfaces [1] from Web IDL callback
functions [2].

One Web-exposed difference is that when using a callback interface,
the user can pass either a function / callable object or a non-callable
object that has a method with the same name as the callback interface
operation:
https://heycam.github.io/webidl/#es-user-objects

When using a callback function, the user needs to pass a function /
callable object:
https://heycam.github.io/webidl/#es-callback-function

This patch adds a new [Callback=FunctionOnly] IDL extended attribute to
indicate that a callback interface should be function-only (i.e. a callback
function in the latest Web IDL specification). Without this IDL extended
attribute, the callback interface will be treated as a regular callback
interface. This will be needed for Bug 148415, as NodeFilter should be
an actual callback interface.

Note that longer term, we should really drop the old-style
[Callback=FunctionOnly] extendd attribute and use actual IDL callback
functions as per the latest Web IDL specification. However, I did not
do this in this patch to minimize patch size.

This patch adds Callback=FunctionOnly] IDL extended attribute to all
our pre-existing callback interfaces so that there is no behavior
change.

       [1] https://heycam.github.io/webidl/#dfn-callback-interface
       [2] https://heycam.github.io/webidl/#idl-callback-functions

* Modules/geolocation/PositionCallback.idl:
* Modules/geolocation/PositionErrorCallback.idl:
* Modules/mediastream/MediaStreamTrackSourcesCallback.idl:
* Modules/mediastream/NavigatorUserMediaErrorCallback.idl:
* Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
* Modules/mediastream/RTCPeerConnectionErrorCallback.idl:
* Modules/mediastream/RTCSessionDescriptionCallback.idl:
* Modules/mediastream/RTCStatsCallback.idl:
* Modules/notifications/NotificationPermissionCallback.idl:
* Modules/quota/StorageErrorCallback.idl:
* Modules/quota/StorageQuotaCallback.idl:
* Modules/quota/StorageUsageCallback.idl:
* Modules/webaudio/AudioBufferCallback.idl:
* Modules/webdatabase/DatabaseCallback.idl:
* Modules/webdatabase/SQLStatementCallback.idl:
* Modules/webdatabase/SQLStatementErrorCallback.idl:
* Modules/webdatabase/SQLTransactionCallback.idl:
* Modules/webdatabase/SQLTransactionErrorCallback.idl:
* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSCallbackData.h:
* bindings/js/JSCustomSQLStatementErrorCallback.cpp:
(WebCore::JSSQLStatementErrorCallback::handleEvent):
* bindings/scripts/CodeGenerator.pm:
(trim):
(IsFunctionOnlyCallbackInterface):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheckExpression):
(GenerateParametersCheck):
(GenerateCallbackImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.cpp: Added.
(WebKit::kit):
(WebKit::core):
(WebKit::wrapTestCallbackFunction):
(webkit_dom_test_callback_function_finalize):
(webkit_dom_test_callback_function_constructor):
(webkit_dom_test_callback_function_class_init):
(webkit_dom_test_callback_function_init):
(webkit_dom_test_callback_function_callback_with_no_param):
(webkit_dom_test_callback_function_callback_with_array_param):
(webkit_dom_test_callback_function_callback_with_serialized_script_value_param):
(webkit_dom_test_callback_function_callback_with_non_bool_return_type):
(webkit_dom_test_callback_function_callback_with_string_list):
(webkit_dom_test_callback_function_callback_with_boolean):
(webkit_dom_test_callback_function_callback_requires_this_to_pass):
* bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestCallbackFunctionPrivate.h: Copied from Source/WebCore/css/MediaQueryListListener.idl.
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithNoParam):
(WebCore::JSTestCallback::callbackWithArrayParam):
(WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
(WebCore::JSTestCallback::callbackWithStringList):
(WebCore::JSTestCallback::callbackWithBoolean):
(WebCore::JSTestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/JS/JSTestCallbackFunction.cpp: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp.
(WebCore::JSTestCallbackFunction::JSTestCallbackFunction):
(WebCore::JSTestCallbackFunction::~JSTestCallbackFunction):
(WebCore::JSTestCallbackFunction::callbackWithNoParam):
(WebCore::JSTestCallbackFunction::callbackWithArrayParam):
(WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
(WebCore::JSTestCallbackFunction::callbackWithStringList):
(WebCore::JSTestCallbackFunction::callbackWithBoolean):
(WebCore::JSTestCallbackFunction::callbackRequiresThisToPass):
* bindings/scripts/test/JS/JSTestCallbackFunction.h: Added.
(WebCore::JSTestCallbackFunction::create):
(WebCore::JSTestCallbackFunction::scriptExecutionContext):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::constructJSTestObj):
(WebCore::JSTestObjConstructor::finishCreation):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): Deleted.
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): Deleted.
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
* bindings/scripts/test/ObjC/DOMTestCallbackFunction.h: Copied from Source/WebCore/html/VoidCallback.idl.
* bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm: Added.
(-[DOMTestCallbackFunction dealloc]):
(-[DOMTestCallbackFunction finalize]):
(-[DOMTestCallbackFunction callbackWithNoParam]):
(-[DOMTestCallbackFunction callbackWithArrayParam:]):
(-[DOMTestCallbackFunction callbackWithSerializedScriptValueParam:strArg:]):
(-[DOMTestCallbackFunction callbackWithNonBoolReturnType:]):
(-[DOMTestCallbackFunction customCallback:class6Param:]):
(-[DOMTestCallbackFunction callbackWithStringList:]):
(-[DOMTestCallbackFunction callbackWithBoolean:]):
(-[DOMTestCallbackFunction callbackRequiresThisToPass:testNodeParam:]):
(core):
(kit):
* bindings/scripts/test/ObjC/DOMTestCallbackFunctionInternal.h: Copied from Source/WebCore/html/VoidCallback.idl.
* bindings/scripts/test/TestCallbackFunction.idl: Copied from Source/WebCore/Modules/webdatabase/DatabaseCallback.idl.
* bindings/scripts/test/TestObj.idl:
* css/MediaQueryListListener.idl:
* dom/RequestAnimationFrameCallback.idl:
* dom/StringCallback.idl:
* html/VoidCallback.idl:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimePropertyNameh">trunk/Source/JavaScriptCore/runtime/PropertyName.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationPositionCallbackidl">trunk/Source/WebCore/Modules/geolocation/PositionCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationPositionErrorCallbackidl">trunk/Source/WebCore/Modules/geolocation/PositionErrorCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamTrackSourcesCallbackidl">trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamNavigatorUserMediaErrorCallbackidl">trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaErrorCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamNavigatorUserMediaSuccessCallbackidl">trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectionErrorCallbackidl">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionErrorCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCSessionDescriptionCallbackidl">trunk/Source/WebCore/Modules/mediastream/RTCSessionDescriptionCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCStatsCallbackidl">trunk/Source/WebCore/Modules/mediastream/RTCStatsCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesnotificationsNotificationPermissionCallbackidl">trunk/Source/WebCore/Modules/notifications/NotificationPermissionCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesquotaStorageErrorCallbackidl">trunk/Source/WebCore/Modules/quota/StorageErrorCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesquotaStorageQuotaCallbackidl">trunk/Source/WebCore/Modules/quota/StorageQuotaCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesquotaStorageUsageCallbackidl">trunk/Source/WebCore/Modules/quota/StorageUsageCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioAudioBufferCallbackidl">trunk/Source/WebCore/Modules/webaudio/AudioBufferCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseCallbackidl">trunk/Source/WebCore/Modules/webdatabase/DatabaseCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseSQLStatementCallbackidl">trunk/Source/WebCore/Modules/webdatabase/SQLStatementCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseSQLStatementErrorCallbackidl">trunk/Source/WebCore/Modules/webdatabase/SQLStatementErrorCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseSQLTransactionCallbackidl">trunk/Source/WebCore/Modules/webdatabase/SQLTransactionCallback.idl</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseSQLTransactionErrorCallbackidl">trunk/Source/WebCore/Modules/webdatabase/SQLTransactionErrorCallback.idl</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCallbackDatacpp">trunk/Source/WebCore/bindings/js/JSCallbackData.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCallbackDatah">trunk/Source/WebCore/bindings/js/JSCallbackData.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCustomSQLStatementErrorCallbackcpp">trunk/Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorpm">trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsIDLAttributestxt">trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCallbackcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestObjidl">trunk/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
<li><a href="#trunkSourceWebCorecssMediaQueryListListeneridl">trunk/Source/WebCore/css/MediaQueryListListener.idl</a></li>
<li><a href="#trunkSourceWebCoredomRequestAnimationFrameCallbackidl">trunk/Source/WebCore/dom/RequestAnimationFrameCallback.idl</a></li>
<li><a href="#trunkSourceWebCoredomStringCallbackidl">trunk/Source/WebCore/dom/StringCallback.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlVoidCallbackidl">trunk/Source/WebCore/html/VoidCallback.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestCallbackFunctioncpp">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestCallbackFunctionh">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestCallbackFunctionPrivateh">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackFunctionPrivate.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctioncpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctionh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestCallbackFunctionh">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunction.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestCallbackFunctionmm">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestCallbackFunctionInternalh">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunctionInternal.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestCallbackFunctionidl">trunk/Source/WebCore/bindings/scripts/test/TestCallbackFunction.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-08-26  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Distinguish Web IDL callback interfaces from Web IDL callback functions
+        https://bugs.webkit.org/show_bug.cgi?id=148434
+
+        Reviewed by Geoffrey Garen.
+
+        Add isNull() convenience method on PropertyName.
+
+        * runtime/PropertyName.h:
+        (JSC::PropertyName::isNull):
+
</ins><span class="cx"> 2015-08-26  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Node::origin should be able to tell you if it's OK to exit
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimePropertyNameh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/PropertyName.h (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/PropertyName.h        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/JavaScriptCore/runtime/PropertyName.h        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -51,6 +51,8 @@
</span><span class="cx">         ASSERT(m_impl-&gt;isSymbol());
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    bool isNull() const { return m_impl; }
+
</ins><span class="cx">     bool isSymbol()
</span><span class="cx">     {
</span><span class="cx">         return m_impl &amp;&amp; m_impl-&gt;isSymbol();
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/ChangeLog        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -1,3 +1,148 @@
</span><ins>+2015-08-26  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Distinguish Web IDL callback interfaces from Web IDL callback functions
+        https://bugs.webkit.org/show_bug.cgi?id=148434
+
+        Reviewed by Geoffrey Garen.
+
+        Distinguish Web IDL callback interfaces [1] from Web IDL callback
+        functions [2].
+
+        One Web-exposed difference is that when using a callback interface,
+        the user can pass either a function / callable object or a non-callable
+        object that has a method with the same name as the callback interface
+        operation:
+        https://heycam.github.io/webidl/#es-user-objects
+
+        When using a callback function, the user needs to pass a function /
+        callable object:
+        https://heycam.github.io/webidl/#es-callback-function
+
+        This patch adds a new [Callback=FunctionOnly] IDL extended attribute to
+        indicate that a callback interface should be function-only (i.e. a callback
+        function in the latest Web IDL specification). Without this IDL extended
+        attribute, the callback interface will be treated as a regular callback
+        interface. This will be needed for Bug 148415, as NodeFilter should be
+        an actual callback interface.
+
+        Note that longer term, we should really drop the old-style
+        [Callback=FunctionOnly] extendd attribute and use actual IDL callback
+        functions as per the latest Web IDL specification. However, I did not
+        do this in this patch to minimize patch size.
+
+        This patch adds Callback=FunctionOnly] IDL extended attribute to all
+        our pre-existing callback interfaces so that there is no behavior
+        change.
+
+       [1] https://heycam.github.io/webidl/#dfn-callback-interface
+       [2] https://heycam.github.io/webidl/#idl-callback-functions
+
+        * Modules/geolocation/PositionCallback.idl:
+        * Modules/geolocation/PositionErrorCallback.idl:
+        * Modules/mediastream/MediaStreamTrackSourcesCallback.idl:
+        * Modules/mediastream/NavigatorUserMediaErrorCallback.idl:
+        * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
+        * Modules/mediastream/RTCPeerConnectionErrorCallback.idl:
+        * Modules/mediastream/RTCSessionDescriptionCallback.idl:
+        * Modules/mediastream/RTCStatsCallback.idl:
+        * Modules/notifications/NotificationPermissionCallback.idl:
+        * Modules/quota/StorageErrorCallback.idl:
+        * Modules/quota/StorageQuotaCallback.idl:
+        * Modules/quota/StorageUsageCallback.idl:
+        * Modules/webaudio/AudioBufferCallback.idl:
+        * Modules/webdatabase/DatabaseCallback.idl:
+        * Modules/webdatabase/SQLStatementCallback.idl:
+        * Modules/webdatabase/SQLStatementErrorCallback.idl:
+        * Modules/webdatabase/SQLTransactionCallback.idl:
+        * Modules/webdatabase/SQLTransactionErrorCallback.idl:
+        * bindings/js/JSCallbackData.cpp:
+        (WebCore::JSCallbackData::invokeCallback):
+        * bindings/js/JSCallbackData.h:
+        * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
+        (WebCore::JSSQLStatementErrorCallback::handleEvent):
+        * bindings/scripts/CodeGenerator.pm:
+        (trim):
+        (IsFunctionOnlyCallbackInterface):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateParametersCheckExpression):
+        (GenerateParametersCheck):
+        (GenerateCallbackImplementation):
+        * bindings/scripts/IDLAttributes.txt:
+        * bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.cpp: Added.
+        (WebKit::kit):
+        (WebKit::core):
+        (WebKit::wrapTestCallbackFunction):
+        (webkit_dom_test_callback_function_finalize):
+        (webkit_dom_test_callback_function_constructor):
+        (webkit_dom_test_callback_function_class_init):
+        (webkit_dom_test_callback_function_init):
+        (webkit_dom_test_callback_function_callback_with_no_param):
+        (webkit_dom_test_callback_function_callback_with_array_param):
+        (webkit_dom_test_callback_function_callback_with_serialized_script_value_param):
+        (webkit_dom_test_callback_function_callback_with_non_bool_return_type):
+        (webkit_dom_test_callback_function_callback_with_string_list):
+        (webkit_dom_test_callback_function_callback_with_boolean):
+        (webkit_dom_test_callback_function_callback_requires_this_to_pass):
+        * bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.h: Added.
+        * bindings/scripts/test/GObject/WebKitDOMTestCallbackFunctionPrivate.h: Copied from Source/WebCore/css/MediaQueryListListener.idl.
+        * bindings/scripts/test/JS/JSTestCallback.cpp:
+        (WebCore::JSTestCallback::callbackWithNoParam):
+        (WebCore::JSTestCallback::callbackWithArrayParam):
+        (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
+        (WebCore::JSTestCallback::callbackWithStringList):
+        (WebCore::JSTestCallback::callbackWithBoolean):
+        (WebCore::JSTestCallback::callbackRequiresThisToPass):
+        * bindings/scripts/test/JS/JSTestCallbackFunction.cpp: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp.
+        (WebCore::JSTestCallbackFunction::JSTestCallbackFunction):
+        (WebCore::JSTestCallbackFunction::~JSTestCallbackFunction):
+        (WebCore::JSTestCallbackFunction::callbackWithNoParam):
+        (WebCore::JSTestCallbackFunction::callbackWithArrayParam):
+        (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
+        (WebCore::JSTestCallbackFunction::callbackWithStringList):
+        (WebCore::JSTestCallbackFunction::callbackWithBoolean):
+        (WebCore::JSTestCallbackFunction::callbackRequiresThisToPass):
+        * bindings/scripts/test/JS/JSTestCallbackFunction.h: Added.
+        (WebCore::JSTestCallbackFunction::create):
+        (WebCore::JSTestCallbackFunction::scriptExecutionContext):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::JSTestObjConstructor::constructJSTestObj):
+        (WebCore::JSTestObjConstructor::finishCreation):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
+        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg):
+        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): Deleted.
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): Deleted.
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+        (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
+        * bindings/scripts/test/ObjC/DOMTestCallbackFunction.h: Copied from Source/WebCore/html/VoidCallback.idl.
+        * bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm: Added.
+        (-[DOMTestCallbackFunction dealloc]):
+        (-[DOMTestCallbackFunction finalize]):
+        (-[DOMTestCallbackFunction callbackWithNoParam]):
+        (-[DOMTestCallbackFunction callbackWithArrayParam:]):
+        (-[DOMTestCallbackFunction callbackWithSerializedScriptValueParam:strArg:]):
+        (-[DOMTestCallbackFunction callbackWithNonBoolReturnType:]):
+        (-[DOMTestCallbackFunction customCallback:class6Param:]):
+        (-[DOMTestCallbackFunction callbackWithStringList:]):
+        (-[DOMTestCallbackFunction callbackWithBoolean:]):
+        (-[DOMTestCallbackFunction callbackRequiresThisToPass:testNodeParam:]):
+        (core):
+        (kit):
+        * bindings/scripts/test/ObjC/DOMTestCallbackFunctionInternal.h: Copied from Source/WebCore/html/VoidCallback.idl.
+        * bindings/scripts/test/TestCallbackFunction.idl: Copied from Source/WebCore/Modules/webdatabase/DatabaseCallback.idl.
+        * bindings/scripts/test/TestObj.idl:
+        * css/MediaQueryListListener.idl:
+        * dom/RequestAnimationFrameCallback.idl:
+        * dom/StringCallback.idl:
+        * html/VoidCallback.idl:
+
</ins><span class="cx"> 2015-08-26  Beth Dakin  &lt;bdakin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION: Safari navigates after a cancelled force click
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationPositionCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/PositionCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/PositionCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/geolocation/PositionCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=GEOLOCATION,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface PositionCallback {
</span><span class="cx">     boolean handleEvent(Geoposition position);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationPositionErrorCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/PositionErrorCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/PositionErrorCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/geolocation/PositionErrorCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=GEOLOCATION,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface PositionErrorCallback {
</span><span class="cx">     boolean handleEvent(PositionError error);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamTrackSourcesCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=MEDIA_STREAM,
</span><del>-    NoInterfaceObject,
</del><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface MediaStreamTrackSourcesCallback {
</span><span class="cx">     boolean handleEvent(sequence&lt;SourceInfo&gt; sources);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamNavigatorUserMediaErrorCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaErrorCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaErrorCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaErrorCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=MEDIA_STREAM,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface NavigatorUserMediaErrorCallback {
</span><span class="cx">     boolean handleEvent(NavigatorUserMediaError error);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamNavigatorUserMediaSuccessCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=MEDIA_STREAM,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface NavigatorUserMediaSuccessCallback {
</span><span class="cx">     boolean handleEvent(MediaStream stream);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectionErrorCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionErrorCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionErrorCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionErrorCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=MEDIA_STREAM,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface RTCPeerConnectionErrorCallback {
</span><span class="cx">     boolean handleEvent(DOMError error);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCSessionDescriptionCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCSessionDescriptionCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCSessionDescriptionCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/mediastream/RTCSessionDescriptionCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=MEDIA_STREAM,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface RTCSessionDescriptionCallback {
</span><span class="cx">     boolean handleEvent(RTCSessionDescription sdp);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCStatsCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCStatsCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCStatsCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/mediastream/RTCStatsCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=MEDIA_STREAM,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface RTCStatsCallback {
</span><span class="cx">     boolean handleEvent(RTCStatsResponse response);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesnotificationsNotificationPermissionCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/notifications/NotificationPermissionCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/notifications/NotificationPermissionCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/notifications/NotificationPermissionCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=NOTIFICATIONS,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface NotificationPermissionCallback {
</span><span class="cx">     boolean handleEvent(DOMString permission);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesquotaStorageErrorCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/quota/StorageErrorCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/quota/StorageErrorCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/quota/StorageErrorCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=QUOTA,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface StorageErrorCallback {
</span><span class="cx">     boolean handleEvent(DOMCoreException error);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesquotaStorageQuotaCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/quota/StorageQuotaCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/quota/StorageQuotaCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/quota/StorageQuotaCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=QUOTA,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface StorageQuotaCallback {
</span><span class="cx">     boolean handleEvent(unsigned long long grantedQuotaInBytes);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesquotaStorageUsageCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/quota/StorageUsageCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/quota/StorageUsageCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/quota/StorageUsageCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=QUOTA,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface StorageUsageCallback {
</span><span class="cx">     boolean handleEvent(unsigned long long currentUsageInBytes, unsigned long long currentQuotaInBytes);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioAudioBufferCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/AudioBufferCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/AudioBufferCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/webaudio/AudioBufferCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> [
</span><span class="cx">     Conditional=WEB_AUDIO,
</span><span class="cx">     JSGenerateToJSObject,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface AudioBufferCallback {
</span><span class="cx">     boolean handleEvent(AudioBuffer audioBuffer);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx">  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-callback interface DatabaseCallback {
</del><ins>+[
+    Callback=FunctionOnly,
+] callback interface DatabaseCallback {
</ins><span class="cx">     boolean handleEvent(Database database);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseSQLStatementCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/SQLStatementCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/SQLStatementCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLStatementCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -25,7 +25,8 @@
</span><span class="cx">  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span class="cx">  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><del>-
-callback interface SQLStatementCallback {
</del><ins>+[
+    Callback=FunctionOnly,
+] callback interface SQLStatementCallback {
</ins><span class="cx">     boolean handleEvent(SQLTransaction transaction, SQLResultSet resultSet);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseSQLStatementErrorCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/SQLStatementErrorCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/SQLStatementErrorCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLStatementErrorCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -25,7 +25,8 @@
</span><span class="cx">  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span class="cx">  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><del>-
-callback interface SQLStatementErrorCallback {
</del><ins>+[
+    Callback=FunctionOnly,
+] callback interface SQLStatementErrorCallback {
</ins><span class="cx">     [Custom] boolean handleEvent(SQLTransaction transaction, SQLError error);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseSQLTransactionCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/SQLTransactionCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/SQLTransactionCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLTransactionCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -25,7 +25,8 @@
</span><span class="cx">  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span class="cx">  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><del>-
-callback interface SQLTransactionCallback {
</del><ins>+[
+    Callback=FunctionOnly,
+] callback interface SQLTransactionCallback {
</ins><span class="cx">     boolean handleEvent(SQLTransaction transaction);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseSQLTransactionErrorCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/SQLTransactionErrorCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/SQLTransactionErrorCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLTransactionErrorCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx">  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-callback interface SQLTransactionErrorCallback {
</del><ins>+[
+    Callback=FunctionOnly,
+] callback interface SQLTransactionErrorCallback {
</ins><span class="cx">     boolean handleEvent(SQLError error);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCallbackDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCallbackData.cpp (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCallbackData.cpp        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/bindings/js/JSCallbackData.cpp        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -43,29 +43,40 @@
</span><span class="cx">     delete static_cast&lt;JSCallbackData*&gt;(context);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue JSCallbackData::invokeCallback(MarkedArgumentBuffer&amp; args, PropertyName functionName, bool* raisedException)
</del><ins>+JSValue JSCallbackData::invokeCallback(MarkedArgumentBuffer&amp; args, CallbackType method, PropertyName functionName, bool* raisedException)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(callback());
</span><del>-    return invokeCallback(callback(), args, functionName, raisedException);
</del><ins>+    return invokeCallback(callback(), args, method, functionName, raisedException);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue JSCallbackData::invokeCallback(JSValue thisValue, MarkedArgumentBuffer&amp; args, PropertyName functionName, bool* raisedException)
</del><ins>+JSValue JSCallbackData::invokeCallback(JSValue thisValue, MarkedArgumentBuffer&amp; args, CallbackType method, PropertyName functionName, bool* raisedException)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(callback());
</span><span class="cx">     ASSERT(globalObject());
</span><span class="cx"> 
</span><span class="cx">     ExecState* exec = globalObject()-&gt;globalExec();
</span><del>-    JSValue function = callback();
</del><ins>+    JSValue function;
+    CallData callData;
+    CallType callType = CallTypeNone;
</ins><span class="cx"> 
</span><del>-    CallData callData;
-    CallType callType = callback()-&gt;methodTable()-&gt;getCallData(callback(), callData);
</del><ins>+    if (method != CallbackType::Object) {
+        function = callback();
+        callType = callback()-&gt;methodTable()-&gt;getCallData(callback(), callData);
+    }
</ins><span class="cx">     if (callType == CallTypeNone) {
</span><ins>+        if (method == CallbackType::Function)
+            return JSValue();
+
+        ASSERT(!functionName.isNull());
</ins><span class="cx">         function = callback()-&gt;get(exec, functionName);
</span><span class="cx">         callType = getCallData(function, callData);
</span><span class="cx">         if (callType == CallTypeNone)
</span><span class="cx">             return JSValue();
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    ASSERT(!function.isEmpty());
+    ASSERT(callType != CallTypeNone);
+
</ins><span class="cx">     ScriptExecutionContext* context = globalObject()-&gt;scriptExecutionContext();
</span><span class="cx">     // We will fail to get the context if the frame has been detached.
</span><span class="cx">     if (!context)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCallbackDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCallbackData.h (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCallbackData.h        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/bindings/js/JSCallbackData.h        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -66,8 +66,9 @@
</span><span class="cx">     JSC::JSObject* callback() { return m_callback.get(); }
</span><span class="cx">     JSDOMGlobalObject* globalObject() { return m_globalObject.get(); }
</span><span class="cx">     
</span><del>-    JSC::JSValue invokeCallback(JSC::MarkedArgumentBuffer&amp;, JSC::PropertyName functionName, bool* raisedException = nullptr);
-    JSC::JSValue invokeCallback(JSC::JSValue thisValue, JSC::MarkedArgumentBuffer&amp;, JSC::PropertyName functionName, bool* raisedException = nullptr);
</del><ins>+    enum class CallbackType { Function, Object, FunctionOrObject };
+    JSC::JSValue invokeCallback(JSC::MarkedArgumentBuffer&amp;, CallbackType, JSC::PropertyName functionName, bool* raisedException = nullptr);
+    JSC::JSValue invokeCallback(JSC::JSValue thisValue, JSC::MarkedArgumentBuffer&amp;, CallbackType, JSC::PropertyName functionName, bool* raisedException = nullptr);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     JSC::Strong&lt;JSC::JSObject&gt; m_callback;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCustomSQLStatementErrorCallbackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">     args.append(toJS(exec, m_data-&gt;globalObject(), error));
</span><span class="cx"> 
</span><span class="cx">     bool raisedException = false;
</span><del>-    JSValue result = m_data-&gt;invokeCallback(args, Identifier::fromString(exec, &quot;handleEvent&quot;), &amp;raisedException);
</del><ins>+    JSValue result = m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &amp;raisedException);
</ins><span class="cx">     if (raisedException) {
</span><span class="cx">         // The spec says:
</span><span class="cx">         // &quot;If the error callback returns false, then move on to the next statement...&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -496,6 +496,13 @@
</span><span class="cx">     return $ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub trim
+{
+    my $string = shift;
+    $string =~ s/^\s+|\s+$//g;
+    return $string;
+}
+
</ins><span class="cx"> # Return the C++ namespace that a given attribute name string is defined in.
</span><span class="cx"> sub NamespaceForAttributeName
</span><span class="cx"> {
</span><span class="lines">@@ -653,6 +660,40 @@
</span><span class="cx">   return ($fileContents =~ /callback\s+interface\s+(\w+)/gs);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+# Callback interface with [Callback=FunctionOnly].
+# FIXME: This should be a callback function:
+# https://heycam.github.io/webidl/#idl-callback-functions
+sub IsFunctionOnlyCallbackInterface
+{
+  my $object = shift;
+  my $type = shift;
+
+  return 0 unless $object-&gt;IsCallbackInterface($type);
+
+  my $idlFile = $object-&gt;IDLFileForInterface($type)
+      or die(&quot;Could NOT find IDL file for interface \&quot;$type\&quot;!\n&quot;);
+
+  open FILE, &quot;&lt;&quot;, $idlFile;
+  my @lines = &lt;FILE&gt;;
+  close FILE;
+
+  my $fileContents = join('', @lines);
+  if ($fileContents =~ /\[(.*)\]\s+callback\s+interface\s+(\w+)/gs) {
+      my @parts = split(',', $1);
+      foreach my $part (@parts) {
+          my @keyValue = split('=', $part);
+          my $key = trim($keyValue[0]);
+          next unless length($key);
+          my $value = &quot;VALUE_IS_MISSING&quot;;
+          $value = trim($keyValue[1]) if @keyValue &gt; 1;
+
+          return 1 if ($key eq &quot;Callback&quot; &amp;&amp; $value eq &quot;FunctionOnly&quot;);
+      }
+  }
+
+  return 0;
+}
+
</ins><span class="cx"> sub GenerateConditionalString
</span><span class="cx"> {
</span><span class="cx">     my $generator = shift;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -1379,7 +1379,11 @@
</span><span class="cx">             }
</span><span class="cx">         } elsif ($codeGenerator-&gt;IsCallbackInterface($parameter-&gt;type)) {
</span><span class="cx">             # For Callbacks only checks if the value is null or object.
</span><del>-            push(@andExpression, &quot;(${value}.isNull() || ${value}.isFunction())&quot;);
</del><ins>+            if ($codeGenerator-&gt;IsFunctionOnlyCallbackInterface($parameter-&gt;type)) {
+                push(@andExpression, &quot;(${value}.isNull() || ${value}.isFunction())&quot;);
+            } else {
+                push(@andExpression, &quot;(${value}.isNull() || ${value}.isObject())&quot;);
+            }
</ins><span class="cx">             $usedArguments{$parameterIndex} = 1;
</span><span class="cx">         } elsif (!IsNativeType($type)) {
</span><span class="cx">             my $condition = &quot;&quot;;
</span><span class="lines">@@ -3271,7 +3275,11 @@
</span><span class="cx">             if ($optional) {
</span><span class="cx">                 push(@$outputArray, &quot;    RefPtr&lt;$argType&gt; $name;\n&quot;);
</span><span class="cx">                 push(@$outputArray, &quot;    if (!exec-&gt;argument($argsIndex).isUndefinedOrNull()) {\n&quot;);
</span><del>-                push(@$outputArray, &quot;        if (!exec-&gt;uncheckedArgument($argsIndex).isFunction())\n&quot;);
</del><ins>+                if ($codeGenerator-&gt;IsFunctionOnlyCallbackInterface($parameter-&gt;type)) {
+                    push(@$outputArray, &quot;        if (!exec-&gt;uncheckedArgument($argsIndex).isFunction())\n&quot;);
+                } else {
+                    push(@$outputArray, &quot;        if (!exec-&gt;uncheckedArgument($argsIndex).isObject())\n&quot;);
+                }
</ins><span class="cx">                 push(@$outputArray, &quot;            return throwArgumentMustBeFunctionError(*exec, $argsIndex, \&quot;$name\&quot;, \&quot;$interfaceName\&quot;, $quotedFunctionName);\n&quot;);
</span><span class="cx">                 if ($function-&gt;isStatic) {
</span><span class="cx">                     AddToImplIncludes(&quot;CallbackFunction.h&quot;);
</span><span class="lines">@@ -3281,7 +3289,11 @@
</span><span class="cx">                 }
</span><span class="cx">                 push(@$outputArray, &quot;    }\n&quot;);
</span><span class="cx">             } else {
</span><del>-                push(@$outputArray, &quot;    if (!exec-&gt;argument($argsIndex).isFunction())\n&quot;);
</del><ins>+                if ($codeGenerator-&gt;IsFunctionOnlyCallbackInterface($parameter-&gt;type)) {
+                    push(@$outputArray, &quot;    if (!exec-&gt;argument($argsIndex).isFunction())\n&quot;);
+                } else {
+                    push(@$outputArray, &quot;    if (!exec-&gt;argument($argsIndex).isObject())\n&quot;);
+                }
</ins><span class="cx">                 push(@$outputArray, &quot;        return throwArgumentMustBeFunctionError(*exec, $argsIndex, \&quot;$name\&quot;, \&quot;$interfaceName\&quot;, $quotedFunctionName);\n&quot;);
</span><span class="cx">                 if ($function-&gt;isStatic) {
</span><span class="cx">                     AddToImplIncludes(&quot;CallbackFunction.h&quot;);
</span><span class="lines">@@ -3598,7 +3610,22 @@
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             push(@implContent, &quot;\n    bool raisedException = false;\n&quot;);
</span><del>-            push(@implContent, &quot;    m_data-&gt;invokeCallback(args, Identifier::fromString(exec, \&quot;${functionName}\&quot;), &amp;raisedException);\n&quot;);
</del><ins>+
+            my $propertyToLookup = &quot;Identifier::fromString(exec, \&quot;${functionName}\&quot;)&quot;;
+            my $invokeMethod = &quot;JSCallbackData::CallbackType::FunctionOrObject&quot;;
+            if ($codeGenerator-&gt;ExtendedAttributeContains($interface-&gt;extendedAttributes-&gt;{&quot;Callback&quot;}, &quot;FunctionOnly&quot;)) {
+                # For callback functions, do not look up callable property on the user object.
+                # https://heycam.github.io/webidl/#es-callback-function
+                $invokeMethod = &quot;JSCallbackData::CallbackType::Function&quot;;
+                $propertyToLookup = &quot;Identifier()&quot;;
+                push(@implContent, &quot;    UNUSED_PARAM(exec);\n&quot;);    
+            } elsif ($numFunctions &gt; 1) {
+                # The callback interface has more than one operation so we should not call the user object as a function.
+                # instead, we should look for a property with the same name as the operation on the user object.
+                # https://heycam.github.io/webidl/#es-user-objects
+                $invokeMethod = &quot;JSCallbackData::CallbackType::Object&quot;;
+            }
+            push(@implContent, &quot;    m_data-&gt;invokeCallback(args, $invokeMethod, $propertyToLookup, &amp;raisedException);\n&quot;);
</ins><span class="cx">             push(@implContent, &quot;    return !raisedException;\n&quot;);
</span><span class="cx">             push(@implContent, &quot;}\n&quot;);
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -23,6 +23,7 @@
</span><span class="cx"> CPPPureInterface
</span><span class="cx"> CachedAttribute
</span><span class="cx"> CallbackNeedsOperatorEqual
</span><ins>+Callback=FunctionOnly
</ins><span class="cx"> CallWith=ScriptExecutionContext|ScriptState|ScriptArguments|CallStack
</span><span class="cx"> CheckSecurity
</span><span class="cx"> CheckSecurityForNode
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestCallbackFunctioncpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.cpp (0 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.cpp        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -0,0 +1,238 @@
</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;WebKitDOMTestCallbackFunction.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;SerializedScriptValue.h&quot;
+#include &quot;WebKitDOMDOMStringListPrivate.h&quot;
+#include &quot;WebKitDOMFloat32ArrayPrivate.h&quot;
+#include &quot;WebKitDOMPrivate.h&quot;
+#include &quot;WebKitDOMTestCallbackFunctionPrivate.h&quot;
+#include &quot;WebKitDOMTestNodePrivate.h&quot;
+#include &quot;gobject/ConvertToUTF8String.h&quot;
+#include &lt;wtf/GetPtr.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+#define WEBKIT_DOM_TEST_CALLBACK_FUNCTION_GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE(obj, WEBKIT_DOM_TYPE_TEST_CALLBACK_FUNCTION, WebKitDOMTestCallbackFunctionPrivate)
+
+typedef struct _WebKitDOMTestCallbackFunctionPrivate {
+#if ENABLE(SPEECH_SYNTHESIS)
+    RefPtr&lt;WebCore::TestCallbackFunction&gt; coreObject;
+#endif // ENABLE(SPEECH_SYNTHESIS)
+} WebKitDOMTestCallbackFunctionPrivate;
+
+#if ENABLE(SPEECH_SYNTHESIS)
+
+namespace WebKit {
+
+WebKitDOMTestCallbackFunction* kit(WebCore::TestCallbackFunction* obj)
+{
+    if (!obj)
+        return 0;
+
+    if (gpointer ret = DOMObjectCache::get(obj))
+        return WEBKIT_DOM_TEST_CALLBACK_FUNCTION(ret);
+
+    return wrapTestCallbackFunction(obj);
+}
+
+WebCore::TestCallbackFunction* core(WebKitDOMTestCallbackFunction* request)
+{
+    return request ? static_cast&lt;WebCore::TestCallbackFunction*&gt;(WEBKIT_DOM_OBJECT(request)-&gt;coreObject) : 0;
+}
+
+WebKitDOMTestCallbackFunction* wrapTestCallbackFunction(WebCore::TestCallbackFunction* coreObject)
+{
+    ASSERT(coreObject);
+    return WEBKIT_DOM_TEST_CALLBACK_FUNCTION(g_object_new(WEBKIT_DOM_TYPE_TEST_CALLBACK_FUNCTION, &quot;core-object&quot;, coreObject, nullptr));
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(SPEECH_SYNTHESIS)
+
+G_DEFINE_TYPE(WebKitDOMTestCallbackFunction, webkit_dom_test_callback_function, WEBKIT_DOM_TYPE_OBJECT)
+
+static void webkit_dom_test_callback_function_finalize(GObject* object)
+{
+    WebKitDOMTestCallbackFunctionPrivate* priv = WEBKIT_DOM_TEST_CALLBACK_FUNCTION_GET_PRIVATE(object);
+#if ENABLE(SPEECH_SYNTHESIS)
+    WebKit::DOMObjectCache::forget(priv-&gt;coreObject.get());
+#endif // ENABLE(SPEECH_SYNTHESIS)
+    priv-&gt;~WebKitDOMTestCallbackFunctionPrivate();
+    G_OBJECT_CLASS(webkit_dom_test_callback_function_parent_class)-&gt;finalize(object);
+}
+
+static GObject* webkit_dom_test_callback_function_constructor(GType type, guint constructPropertiesCount, GObjectConstructParam* constructProperties)
+{
+    GObject* object = G_OBJECT_CLASS(webkit_dom_test_callback_function_parent_class)-&gt;constructor(type, constructPropertiesCount, constructProperties);
+#if ENABLE(SPEECH_SYNTHESIS)
+    WebKitDOMTestCallbackFunctionPrivate* priv = WEBKIT_DOM_TEST_CALLBACK_FUNCTION_GET_PRIVATE(object);
+    priv-&gt;coreObject = static_cast&lt;WebCore::TestCallbackFunction*&gt;(WEBKIT_DOM_OBJECT(object)-&gt;coreObject);
+    WebKit::DOMObjectCache::put(priv-&gt;coreObject.get(), object);
+#endif // ENABLE(SPEECH_SYNTHESIS)
+    return object;
+}
+
+static void webkit_dom_test_callback_function_class_init(WebKitDOMTestCallbackFunctionClass* requestClass)
+{
+    GObjectClass* gobjectClass = G_OBJECT_CLASS(requestClass);
+    g_type_class_add_private(gobjectClass, sizeof(WebKitDOMTestCallbackFunctionPrivate));
+    gobjectClass-&gt;constructor = webkit_dom_test_callback_function_constructor;
+    gobjectClass-&gt;finalize = webkit_dom_test_callback_function_finalize;
+}
+
+static void webkit_dom_test_callback_function_init(WebKitDOMTestCallbackFunction* request)
+{
+    WebKitDOMTestCallbackFunctionPrivate* priv = WEBKIT_DOM_TEST_CALLBACK_FUNCTION_GET_PRIVATE(request);
+    new (priv) WebKitDOMTestCallbackFunctionPrivate();
+}
+
+gboolean webkit_dom_test_callback_function_callback_with_no_param(WebKitDOMTestCallbackFunction* self)
+{
+#if ENABLE(SPEECH_SYNTHESIS)
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_CALLBACK_FUNCTION(self), FALSE);
+    WebCore::TestCallbackFunction* item = WebKit::core(self);
+    gboolean result = item-&gt;callbackWithNoParam();
+    return result;
+#else
+    UNUSED_PARAM(self);
+    WEBKIT_WARN_FEATURE_NOT_PRESENT(&quot;Speech Synthesis&quot;)
+    return static_cast&lt;gboolean&gt;(0);
+#endif /* ENABLE(SPEECH_SYNTHESIS) */
+}
+
+gboolean webkit_dom_test_callback_function_callback_with_array_param(WebKitDOMTestCallbackFunction* self, WebKitDOMFloat32Array* arrayParam)
+{
+#if ENABLE(SPEECH_SYNTHESIS)
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_CALLBACK_FUNCTION(self), FALSE);
+    g_return_val_if_fail(WEBKIT_DOM_IS_FLOAT32ARRAY(arrayParam), FALSE);
+    WebCore::TestCallbackFunction* item = WebKit::core(self);
+    WebCore::Float32Array* convertedArrayParam = WebKit::core(arrayParam);
+    gboolean result = item-&gt;callbackWithArrayParam(convertedArrayParam);
+    return result;
+#else
+    UNUSED_PARAM(self);
+    UNUSED_PARAM(arrayParam);
+    WEBKIT_WARN_FEATURE_NOT_PRESENT(&quot;Speech Synthesis&quot;)
+    return static_cast&lt;gboolean&gt;(0);
+#endif /* ENABLE(SPEECH_SYNTHESIS) */
+}
+
+gboolean webkit_dom_test_callback_function_callback_with_serialized_script_value_param(WebKitDOMTestCallbackFunction* self, const gchar* srzParam, const gchar* strArg)
+{
+#if ENABLE(SPEECH_SYNTHESIS)
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_CALLBACK_FUNCTION(self), FALSE);
+    g_return_val_if_fail(srzParam, FALSE);
+    g_return_val_if_fail(strArg, FALSE);
+    WebCore::TestCallbackFunction* item = WebKit::core(self);
+    WTF::String convertedStrArg = WTF::String::fromUTF8(strArg);
+    gboolean result = item-&gt;callbackWithSerializedScriptValueParam(WebCore::SerializedScriptValue::create(WTF::String::fromUTF8(srzParam)), convertedStrArg);
+    return result;
+#else
+    UNUSED_PARAM(self);
+    UNUSED_PARAM(srzParam);
+    UNUSED_PARAM(strArg);
+    WEBKIT_WARN_FEATURE_NOT_PRESENT(&quot;Speech Synthesis&quot;)
+    return static_cast&lt;gboolean&gt;(0);
+#endif /* ENABLE(SPEECH_SYNTHESIS) */
+}
+
+glong webkit_dom_test_callback_function_callback_with_non_bool_return_type(WebKitDOMTestCallbackFunction* self, const gchar* strArg)
+{
+#if ENABLE(SPEECH_SYNTHESIS)
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_CALLBACK_FUNCTION(self), 0);
+    g_return_val_if_fail(strArg, 0);
+    WebCore::TestCallbackFunction* item = WebKit::core(self);
+    WTF::String convertedStrArg = WTF::String::fromUTF8(strArg);
+    glong result = item-&gt;callbackWithNonBoolReturnType(convertedStrArg);
+    return result;
+#else
+    UNUSED_PARAM(self);
+    UNUSED_PARAM(strArg);
+    WEBKIT_WARN_FEATURE_NOT_PRESENT(&quot;Speech Synthesis&quot;)
+    return static_cast&lt;glong&gt;(0);
+#endif /* ENABLE(SPEECH_SYNTHESIS) */
+}
+
+gboolean webkit_dom_test_callback_function_callback_with_string_list(WebKitDOMTestCallbackFunction* self, WebKitDOMDOMStringList* listParam)
+{
+#if ENABLE(SPEECH_SYNTHESIS)
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_CALLBACK_FUNCTION(self), FALSE);
+    g_return_val_if_fail(WEBKIT_DOM_IS_DOM_STRING_LIST(listParam), FALSE);
+    WebCore::TestCallbackFunction* item = WebKit::core(self);
+    WebCore::DOMStringList* convertedListParam = WebKit::core(listParam);
+    gboolean result = item-&gt;callbackWithStringList(convertedListParam);
+    return result;
+#else
+    UNUSED_PARAM(self);
+    UNUSED_PARAM(listParam);
+    WEBKIT_WARN_FEATURE_NOT_PRESENT(&quot;Speech Synthesis&quot;)
+    return static_cast&lt;gboolean&gt;(0);
+#endif /* ENABLE(SPEECH_SYNTHESIS) */
+}
+
+gboolean webkit_dom_test_callback_function_callback_with_boolean(WebKitDOMTestCallbackFunction* self, gboolean boolParam)
+{
+#if ENABLE(SPEECH_SYNTHESIS)
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_CALLBACK_FUNCTION(self), FALSE);
+    WebCore::TestCallbackFunction* item = WebKit::core(self);
+    gboolean result = item-&gt;callbackWithBoolean(boolParam);
+    return result;
+#else
+    UNUSED_PARAM(self);
+    UNUSED_PARAM(boolParam);
+    WEBKIT_WARN_FEATURE_NOT_PRESENT(&quot;Speech Synthesis&quot;)
+    return static_cast&lt;gboolean&gt;(0);
+#endif /* ENABLE(SPEECH_SYNTHESIS) */
+}
+
+gboolean webkit_dom_test_callback_function_callback_requires_this_to_pass(WebKitDOMTestCallbackFunction* self, glong longParam, WebKitDOMTestNode* testNodeParam)
+{
+#if ENABLE(SPEECH_SYNTHESIS)
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_CALLBACK_FUNCTION(self), FALSE);
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_NODE(testNodeParam), FALSE);
+    WebCore::TestCallbackFunction* item = WebKit::core(self);
+    WebCore::TestNode* convertedTestNodeParam = WebKit::core(testNodeParam);
+    gboolean result = item-&gt;callbackRequiresThisToPass(longParam, convertedTestNodeParam);
+    return result;
+#else
+    UNUSED_PARAM(self);
+    UNUSED_PARAM(longParam);
+    UNUSED_PARAM(testNodeParam);
+    WEBKIT_WARN_FEATURE_NOT_PRESENT(&quot;Speech Synthesis&quot;)
+    return static_cast&lt;gboolean&gt;(0);
+#endif /* ENABLE(SPEECH_SYNTHESIS) */
+}
+
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestCallbackFunctionh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.h (0 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.h        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -0,0 +1,138 @@
</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 WebKitDOMTestCallbackFunction_h
+#define WebKitDOMTestCallbackFunction_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_CALLBACK_FUNCTION            (webkit_dom_test_callback_function_get_type())
+#define WEBKIT_DOM_TEST_CALLBACK_FUNCTION(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_DOM_TYPE_TEST_CALLBACK_FUNCTION, WebKitDOMTestCallbackFunction))
+#define WEBKIT_DOM_TEST_CALLBACK_FUNCTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_DOM_TYPE_TEST_CALLBACK_FUNCTION, WebKitDOMTestCallbackFunctionClass)
+#define WEBKIT_DOM_IS_TEST_CALLBACK_FUNCTION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_DOM_TYPE_TEST_CALLBACK_FUNCTION))
+#define WEBKIT_DOM_IS_TEST_CALLBACK_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_DOM_TYPE_TEST_CALLBACK_FUNCTION))
+#define WEBKIT_DOM_TEST_CALLBACK_FUNCTION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_DOM_TYPE_TEST_CALLBACK_FUNCTION, WebKitDOMTestCallbackFunctionClass))
+
+struct _WebKitDOMTestCallbackFunction {
+    WebKitDOMObject parent_instance;
+};
+
+struct _WebKitDOMTestCallbackFunctionClass {
+    WebKitDOMObjectClass parent_class;
+};
+
+WEBKIT_API GType
+webkit_dom_test_callback_function_get_type(void);
+
+/**
+ * webkit_dom_test_callback_function_callback_with_no_param:
+ * @self: A #WebKitDOMTestCallbackFunction
+ *
+ * Returns: A #gboolean
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API gboolean
+webkit_dom_test_callback_function_callback_with_no_param(WebKitDOMTestCallbackFunction* self);
+
+/**
+ * webkit_dom_test_callback_function_callback_with_array_param:
+ * @self: A #WebKitDOMTestCallbackFunction
+ * @arrayParam: A #WebKitDOMFloat32Array
+ *
+ * Returns: A #gboolean
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API gboolean
+webkit_dom_test_callback_function_callback_with_array_param(WebKitDOMTestCallbackFunction* self, WebKitDOMFloat32Array* arrayParam);
+
+/**
+ * webkit_dom_test_callback_function_callback_with_serialized_script_value_param:
+ * @self: A #WebKitDOMTestCallbackFunction
+ * @srzParam: A #gchar
+ * @strArg: A #gchar
+ *
+ * Returns: A #gboolean
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API gboolean
+webkit_dom_test_callback_function_callback_with_serialized_script_value_param(WebKitDOMTestCallbackFunction* self, const gchar* srzParam, const gchar* strArg);
+
+/**
+ * webkit_dom_test_callback_function_callback_with_non_bool_return_type:
+ * @self: A #WebKitDOMTestCallbackFunction
+ * @strArg: A #gchar
+ *
+ * Returns: A #glong
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API glong
+webkit_dom_test_callback_function_callback_with_non_bool_return_type(WebKitDOMTestCallbackFunction* self, const gchar* strArg);
+
+/**
+ * webkit_dom_test_callback_function_callback_with_string_list:
+ * @self: A #WebKitDOMTestCallbackFunction
+ * @listParam: A #WebKitDOMDOMStringList
+ *
+ * Returns: A #gboolean
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API gboolean
+webkit_dom_test_callback_function_callback_with_string_list(WebKitDOMTestCallbackFunction* self, WebKitDOMDOMStringList* listParam);
+
+/**
+ * webkit_dom_test_callback_function_callback_with_boolean:
+ * @self: A #WebKitDOMTestCallbackFunction
+ * @boolParam: A #gboolean
+ *
+ * Returns: A #gboolean
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API gboolean
+webkit_dom_test_callback_function_callback_with_boolean(WebKitDOMTestCallbackFunction* self, gboolean boolParam);
+
+/**
+ * webkit_dom_test_callback_function_callback_requires_this_to_pass:
+ * @self: A #WebKitDOMTestCallbackFunction
+ * @longParam: A #glong
+ * @testNodeParam: A #WebKitDOMTestNode
+ *
+ * Returns: A #gboolean
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API gboolean
+webkit_dom_test_callback_function_callback_requires_this_to_pass(WebKitDOMTestCallbackFunction* self, glong longParam, WebKitDOMTestNode* testNodeParam);
+
+G_END_DECLS
+
+#endif /* WEBKIT_DOM_USE_UNSTABLE_API */
+#endif /* WebKitDOMTestCallbackFunction_h */
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestCallbackFunctionPrivatehfromrev188993trunkSourceWebCorecssMediaQueryListListeneridl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackFunctionPrivate.h (from rev 188993, trunk/Source/WebCore/css/MediaQueryListListener.idl) (0 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackFunctionPrivate.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackFunctionPrivate.h        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -0,0 +1,36 @@
</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 WebKitDOMTestCallbackFunctionPrivate_h
+#define WebKitDOMTestCallbackFunctionPrivate_h
+
+#include &quot;TestCallbackFunction.h&quot;
+#include &lt;webkitdom/WebKitDOMTestCallbackFunction.h&gt;
+#if ENABLE(SPEECH_SYNTHESIS)
+
+namespace WebKit {
+WebKitDOMTestCallbackFunction* wrapTestCallbackFunction(WebCore::TestCallbackFunction*);
+WebKitDOMTestCallbackFunction* kit(WebCore::TestCallbackFunction*);
+WebCore::TestCallbackFunction* core(WebKitDOMTestCallbackFunction*);
+} // namespace WebKit
+
+#endif /* ENABLE(SPEECH_SYNTHESIS) */
+
+#endif /* WebKitDOMTestCallbackFunctionPrivate_h */
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">     MarkedArgumentBuffer args;
</span><span class="cx"> 
</span><span class="cx">     bool raisedException = false;
</span><del>-    m_data-&gt;invokeCallback(args, Identifier::fromString(exec, &quot;callbackWithNoParam&quot;), &amp;raisedException);
</del><ins>+    m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, &quot;callbackWithNoParam&quot;), &amp;raisedException);
</ins><span class="cx">     return !raisedException;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">     args.append(toJS(exec, m_data-&gt;globalObject(), WTF::getPtr(arrayParam)));
</span><span class="cx"> 
</span><span class="cx">     bool raisedException = false;
</span><del>-    m_data-&gt;invokeCallback(args, Identifier::fromString(exec, &quot;callbackWithArrayParam&quot;), &amp;raisedException);
</del><ins>+    m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, &quot;callbackWithArrayParam&quot;), &amp;raisedException);
</ins><span class="cx">     return !raisedException;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx">     args.append(jsStringWithCache(exec, strArg));
</span><span class="cx"> 
</span><span class="cx">     bool raisedException = false;
</span><del>-    m_data-&gt;invokeCallback(args, Identifier::fromString(exec, &quot;callbackWithSerializedScriptValueParam&quot;), &amp;raisedException);
</del><ins>+    m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, &quot;callbackWithSerializedScriptValueParam&quot;), &amp;raisedException);
</ins><span class="cx">     return !raisedException;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">     args.append(toJS(exec, m_data-&gt;globalObject(), WTF::getPtr(listParam)));
</span><span class="cx"> 
</span><span class="cx">     bool raisedException = false;
</span><del>-    m_data-&gt;invokeCallback(args, Identifier::fromString(exec, &quot;callbackWithStringList&quot;), &amp;raisedException);
</del><ins>+    m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, &quot;callbackWithStringList&quot;), &amp;raisedException);
</ins><span class="cx">     return !raisedException;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx">     args.append(jsBoolean(boolParam));
</span><span class="cx"> 
</span><span class="cx">     bool raisedException = false;
</span><del>-    m_data-&gt;invokeCallback(args, Identifier::fromString(exec, &quot;callbackWithBoolean&quot;), &amp;raisedException);
</del><ins>+    m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, &quot;callbackWithBoolean&quot;), &amp;raisedException);
</ins><span class="cx">     return !raisedException;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx">     args.append(toJS(exec, m_data-&gt;globalObject(), WTF::getPtr(testNodeParam)));
</span><span class="cx"> 
</span><span class="cx">     bool raisedException = false;
</span><del>-    m_data-&gt;invokeCallback(args, Identifier::fromString(exec, &quot;callbackRequiresThisToPass&quot;), &amp;raisedException);
</del><ins>+    m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, &quot;callbackRequiresThisToPass&quot;), &amp;raisedException);
</ins><span class="cx">     return !raisedException;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctioncppfromrev188993trunkSourceWebCorebindingsscriptstestJSJSTestCallbackcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp (from rev 188993, trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp) (0 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -0,0 +1,182 @@
</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;
+
+#if ENABLE(SPEECH_SYNTHESIS)
+
+#include &quot;JSTestCallbackFunction.h&quot;
+
+#include &quot;DOMStringList.h&quot;
+#include &quot;JSDOMStringList.h&quot;
+#include &quot;JSTestNode.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
+#include &quot;SerializedScriptValue.h&quot;
+#include &quot;TestNode.h&quot;
+#include &quot;URL.h&quot;
+#include &lt;runtime/JSLock.h&gt;
+#include &lt;runtime/JSString.h&gt;
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSTestCallbackFunction::JSTestCallbackFunction(JSObject* callback, JSDOMGlobalObject* globalObject)
+    : TestCallbackFunction()
+    , ActiveDOMCallback(globalObject-&gt;scriptExecutionContext())
+    , m_data(new JSCallbackData(callback, globalObject))
+{
+}
+
+JSTestCallbackFunction::~JSTestCallbackFunction()
+{
+    ScriptExecutionContext* context = scriptExecutionContext();
+    // When the context is destroyed, all tasks with a reference to a callback
+    // should be deleted. So if the context is 0, we are on the context thread.
+    if (!context || context-&gt;isContextThread())
+        delete m_data;
+    else
+        context-&gt;postTask(DeleteCallbackDataTask(m_data));
+#ifndef NDEBUG
+    m_data = 0;
+#endif
+}
+
+
+// Functions
+
+bool JSTestCallbackFunction::callbackWithNoParam()
+{
+    if (!canInvokeCallback())
+        return true;
+
+    Ref&lt;JSTestCallbackFunction&gt; protect(*this);
+
+    JSLockHolder lock(m_data-&gt;globalObject()-&gt;vm());
+
+    ExecState* exec = m_data-&gt;globalObject()-&gt;globalExec();
+    MarkedArgumentBuffer args;
+
+    bool raisedException = false;
+    UNUSED_PARAM(exec);
+    m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &amp;raisedException);
+    return !raisedException;
+}
+
+bool JSTestCallbackFunction::callbackWithArrayParam(RefPtr&lt;Float32Array&gt; arrayParam)
+{
+    if (!canInvokeCallback())
+        return true;
+
+    Ref&lt;JSTestCallbackFunction&gt; protect(*this);
+
+    JSLockHolder lock(m_data-&gt;globalObject()-&gt;vm());
+
+    ExecState* exec = m_data-&gt;globalObject()-&gt;globalExec();
+    MarkedArgumentBuffer args;
+    args.append(toJS(exec, m_data-&gt;globalObject(), WTF::getPtr(arrayParam)));
+
+    bool raisedException = false;
+    UNUSED_PARAM(exec);
+    m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &amp;raisedException);
+    return !raisedException;
+}
+
+bool JSTestCallbackFunction::callbackWithSerializedScriptValueParam(PassRefPtr&lt;SerializedScriptValue&gt; srzParam, const String&amp; strArg)
+{
+    if (!canInvokeCallback())
+        return true;
+
+    Ref&lt;JSTestCallbackFunction&gt; protect(*this);
+
+    JSLockHolder lock(m_data-&gt;globalObject()-&gt;vm());
+
+    ExecState* exec = m_data-&gt;globalObject()-&gt;globalExec();
+    MarkedArgumentBuffer args;
+    args.append(srzParam ? srzParam-&gt;deserialize(exec, castedThis-&gt;globalObject(), 0) : jsNull());
+    args.append(jsStringWithCache(exec, strArg));
+
+    bool raisedException = false;
+    UNUSED_PARAM(exec);
+    m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &amp;raisedException);
+    return !raisedException;
+}
+
+bool JSTestCallbackFunction::callbackWithStringList(PassRefPtr&lt;DOMStringList&gt; listParam)
+{
+    if (!canInvokeCallback())
+        return true;
+
+    Ref&lt;JSTestCallbackFunction&gt; protect(*this);
+
+    JSLockHolder lock(m_data-&gt;globalObject()-&gt;vm());
+
+    ExecState* exec = m_data-&gt;globalObject()-&gt;globalExec();
+    MarkedArgumentBuffer args;
+    args.append(toJS(exec, m_data-&gt;globalObject(), WTF::getPtr(listParam)));
+
+    bool raisedException = false;
+    UNUSED_PARAM(exec);
+    m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &amp;raisedException);
+    return !raisedException;
+}
+
+bool JSTestCallbackFunction::callbackWithBoolean(bool boolParam)
+{
+    if (!canInvokeCallback())
+        return true;
+
+    Ref&lt;JSTestCallbackFunction&gt; protect(*this);
+
+    JSLockHolder lock(m_data-&gt;globalObject()-&gt;vm());
+
+    ExecState* exec = m_data-&gt;globalObject()-&gt;globalExec();
+    MarkedArgumentBuffer args;
+    args.append(jsBoolean(boolParam));
+
+    bool raisedException = false;
+    UNUSED_PARAM(exec);
+    m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &amp;raisedException);
+    return !raisedException;
+}
+
+bool JSTestCallbackFunction::callbackRequiresThisToPass(int longParam, TestNode* testNodeParam)
+{
+    if (!canInvokeCallback())
+        return true;
+
+    Ref&lt;JSTestCallbackFunction&gt; protect(*this);
+
+    JSLockHolder lock(m_data-&gt;globalObject()-&gt;vm());
+
+    ExecState* exec = m_data-&gt;globalObject()-&gt;globalExec();
+    MarkedArgumentBuffer args;
+    args.append(jsNumber(longParam));
+    args.append(toJS(exec, m_data-&gt;globalObject(), WTF::getPtr(testNodeParam)));
+
+    bool raisedException = false;
+    UNUSED_PARAM(exec);
+    m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &amp;raisedException);
+    return !raisedException;
+}
+
+}
+
+#endif // ENABLE(SPEECH_SYNTHESIS)
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctionh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h (0 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -0,0 +1,64 @@
</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 JSTestCallbackFunction_h
+#define JSTestCallbackFunction_h
+
+#if ENABLE(SPEECH_SYNTHESIS)
+
+#include &quot;ActiveDOMCallback.h&quot;
+#include &quot;JSCallbackData.h&quot;
+#include &quot;TestCallbackFunction.h&quot;
+#include &lt;wtf/Forward.h&gt;
+
+namespace WebCore {
+
+class JSTestCallbackFunction : public TestCallbackFunction, public ActiveDOMCallback {
+public:
+    static Ref&lt;JSTestCallbackFunction&gt; create(JSC::JSObject* callback, JSDOMGlobalObject* globalObject)
+    {
+        return adoptRef(*new JSTestCallbackFunction(callback, globalObject));
+    }
+
+    virtual ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
+
+    virtual ~JSTestCallbackFunction();
+
+    // Functions
+    virtual bool callbackWithNoParam();
+    virtual bool callbackWithArrayParam(RefPtr&lt;Float32Array&gt; arrayParam);
+    virtual bool callbackWithSerializedScriptValueParam(PassRefPtr&lt;SerializedScriptValue&gt; srzParam, const String&amp; strArg);
+    COMPILE_ASSERT(false)    virtual int callbackWithNonBoolReturnType(const String&amp; strArg);
+    virtual int customCallback(Class5* class5Param, Class6* class6Param);
+    virtual bool callbackWithStringList(PassRefPtr&lt;DOMStringList&gt; listParam);
+    virtual bool callbackWithBoolean(bool boolParam);
+    virtual bool callbackRequiresThisToPass(int longParam, TestNode* testNodeParam);
+
+private:
+    JSTestCallbackFunction(JSC::JSObject* callback, JSDOMGlobalObject*);
+
+    JSCallbackData* m_data;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SPEECH_SYNTHESIS)
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> #include &quot;JSSVGPoint.h&quot;
</span><span class="cx"> #include &quot;JSScriptProfile.h&quot;
</span><span class="cx"> #include &quot;JSTestCallback.h&quot;
</span><ins>+#include &quot;JSTestCallbackFunction.h&quot;
</ins><span class="cx"> #include &quot;JSTestNode.h&quot;
</span><span class="cx"> #include &quot;JSTestObj.h&quot;
</span><span class="cx"> #include &quot;JSTestSubObj.h&quot;
</span><span class="lines">@@ -116,6 +117,9 @@
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg(JSC::ExecState*);
</span><ins>+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg(JSC::ExecState*);
</ins><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionStaticMethodWithCallbackArg(JSC::ExecState*);
</span><span class="cx"> #if ENABLE(Condition1)
</span><span class="lines">@@ -451,12 +455,15 @@
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL JSTestObjConstructor::constructJSTestObj(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     auto* castedThis = jsCast&lt;JSTestObjConstructor*&gt;(exec-&gt;callee());
</span><del>-    if (UNLIKELY(exec-&gt;argumentCount() &lt; 1))
</del><ins>+    if (UNLIKELY(exec-&gt;argumentCount() &lt; 2))
</ins><span class="cx">         return throwVMError(exec, createNotEnoughArgumentsError(exec));
</span><del>-    if (!exec-&gt;argument(0).isFunction())
</del><ins>+    if (!exec-&gt;argument(0).isObject())
</ins><span class="cx">         return throwArgumentMustBeFunctionError(*exec, 0, &quot;testCallback&quot;, &quot;TestObj&quot;, nullptr);
</span><span class="cx">     RefPtr&lt;TestCallback&gt; testCallback = JSTestCallback::create(asObject(exec-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</span><del>-    RefPtr&lt;TestObj&gt; object = TestObj::create(testCallback);
</del><ins>+    if (!exec-&gt;argument(1).isFunction())
+        return throwArgumentMustBeFunctionError(*exec, 1, &quot;testCallbackFunction&quot;, &quot;TestObj&quot;, nullptr);
+    RefPtr&lt;TestCallbackFunction&gt; testCallbackFunction = JSTestCallbackFunction::create(asObject(exec-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
+    RefPtr&lt;TestObj&gt; object = TestObj::create(testCallback, testCallbackFunction);
</ins><span class="cx">     return JSValue::encode(asObject(toJS(exec, castedThis-&gt;globalObject(), object.get())));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -473,7 +480,7 @@
</span><span class="cx">     ASSERT(inherits(info()));
</span><span class="cx">     putDirect(vm, vm.propertyNames-&gt;prototype, JSTestObj::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
</span><span class="cx">     putDirect(vm, vm.propertyNames-&gt;name, jsNontrivialString(&amp;vm, String(ASCIILiteral(&quot;TestObject&quot;))), ReadOnly | DontEnum);
</span><del>-    putDirect(vm, vm.propertyNames-&gt;length, jsNumber(1), ReadOnly | DontEnum);
</del><ins>+    putDirect(vm, vm.propertyNames-&gt;length, jsNumber(2), ReadOnly | DontEnum);
</ins><span class="cx">     reifyStaticProperties(vm, JSTestObjConstructorTableValues, *this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -618,6 +625,9 @@
</span><span class="cx">     { &quot;methodWithCallbackArg&quot;, JSC::Function, NoIntrinsic, (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithCallbackArg), (intptr_t) (1) },
</span><span class="cx">     { &quot;methodWithNonCallbackArgAndCallbackArg&quot;, JSC::Function, NoIntrinsic, (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg), (intptr_t) (2) },
</span><span class="cx">     { &quot;methodWithCallbackAndOptionalArg&quot;, JSC::Function, NoIntrinsic, (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg), (intptr_t) (0) },
</span><ins>+    { &quot;methodWithCallbackFunctionArg&quot;, JSC::Function, NoIntrinsic, (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg), (intptr_t) (1) },
+    { &quot;methodWithNonCallbackArgAndCallbackFunctionArg&quot;, JSC::Function, NoIntrinsic, (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg), (intptr_t) (2) },
+    { &quot;methodWithCallbackFunctionAndOptionalArg&quot;, JSC::Function, NoIntrinsic, (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg), (intptr_t) (0) },
</ins><span class="cx"> #if ENABLE(Condition1)
</span><span class="cx">     { &quot;conditionalMethod1&quot;, JSC::Function, NoIntrinsic, (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionConditionalMethod1), (intptr_t) (0) },
</span><span class="cx"> #else
</span><span class="lines">@@ -3599,7 +3609,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     if (UNLIKELY(exec-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(exec, createNotEnoughArgumentsError(exec));
</span><del>-    if (!exec-&gt;argument(0).isFunction())
</del><ins>+    if (!exec-&gt;argument(0).isObject())
</ins><span class="cx">         return throwArgumentMustBeFunctionError(*exec, 0, &quot;callback&quot;, &quot;TestObj&quot;, &quot;methodWithCallbackArg&quot;);
</span><span class="cx">     RefPtr&lt;TestCallback&gt; callback = JSTestCallback::create(asObject(exec-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</span><span class="cx">     impl.methodWithCallbackArg(callback);
</span><span class="lines">@@ -3619,7 +3629,7 @@
</span><span class="cx">     int nonCallback = toInt32(exec, exec-&gt;argument(0), NormalConversion);
</span><span class="cx">     if (UNLIKELY(exec-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    if (!exec-&gt;argument(1).isFunction())
</del><ins>+    if (!exec-&gt;argument(1).isObject())
</ins><span class="cx">         return throwArgumentMustBeFunctionError(*exec, 1, &quot;callback&quot;, &quot;TestObj&quot;, &quot;methodWithNonCallbackArgAndCallbackArg&quot;);
</span><span class="cx">     RefPtr&lt;TestCallback&gt; callback = JSTestCallback::create(asObject(exec-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</span><span class="cx">     impl.methodWithNonCallbackArgAndCallbackArg(nonCallback, callback);
</span><span class="lines">@@ -3636,7 +3646,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     RefPtr&lt;TestCallback&gt; callback;
</span><span class="cx">     if (!exec-&gt;argument(0).isUndefinedOrNull()) {
</span><del>-        if (!exec-&gt;uncheckedArgument(0).isFunction())
</del><ins>+        if (!exec-&gt;uncheckedArgument(0).isObject())
</ins><span class="cx">             return throwArgumentMustBeFunctionError(*exec, 0, &quot;callback&quot;, &quot;TestObj&quot;, &quot;methodWithCallbackAndOptionalArg&quot;);
</span><span class="cx">         callback = JSTestCallback::create(asObject(exec-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</span><span class="cx">     }
</span><span class="lines">@@ -3644,11 +3654,66 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg(ExecState* exec)
+{
+    JSValue thisValue = exec-&gt;thisValue();
+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*exec, &quot;TestObj&quot;, &quot;methodWithCallbackFunctionArg&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;impl();
+    if (UNLIKELY(exec-&gt;argumentCount() &lt; 1))
+        return throwVMError(exec, createNotEnoughArgumentsError(exec));
+    if (!exec-&gt;argument(0).isFunction())
+        return throwArgumentMustBeFunctionError(*exec, 0, &quot;callback&quot;, &quot;TestObj&quot;, &quot;methodWithCallbackFunctionArg&quot;);
+    RefPtr&lt;TestCallbackFunction&gt; callback = JSTestCallbackFunction::create(asObject(exec-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
+    impl.methodWithCallbackFunctionArg(callback);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg(ExecState* exec)
+{
+    JSValue thisValue = exec-&gt;thisValue();
+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*exec, &quot;TestObj&quot;, &quot;methodWithNonCallbackArgAndCallbackFunctionArg&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;impl();
+    if (UNLIKELY(exec-&gt;argumentCount() &lt; 2))
+        return throwVMError(exec, createNotEnoughArgumentsError(exec));
+    int nonCallback = toInt32(exec, exec-&gt;argument(0), NormalConversion);
+    if (UNLIKELY(exec-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    if (!exec-&gt;argument(1).isFunction())
+        return throwArgumentMustBeFunctionError(*exec, 1, &quot;callback&quot;, &quot;TestObj&quot;, &quot;methodWithNonCallbackArgAndCallbackFunctionArg&quot;);
+    RefPtr&lt;TestCallbackFunction&gt; callback = JSTestCallbackFunction::create(asObject(exec-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
+    impl.methodWithNonCallbackArgAndCallbackFunctionArg(nonCallback, callback);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg(ExecState* exec)
+{
+    JSValue thisValue = exec-&gt;thisValue();
+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*exec, &quot;TestObj&quot;, &quot;methodWithCallbackFunctionAndOptionalArg&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;impl();
+    RefPtr&lt;TestCallbackFunction&gt; callback;
+    if (!exec-&gt;argument(0).isUndefinedOrNull()) {
+        if (!exec-&gt;uncheckedArgument(0).isFunction())
+            return throwArgumentMustBeFunctionError(*exec, 0, &quot;callback&quot;, &quot;TestObj&quot;, &quot;methodWithCallbackFunctionAndOptionalArg&quot;);
+        callback = JSTestCallbackFunction::create(asObject(exec-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
+    }
+    impl.methodWithCallbackFunctionAndOptionalArg(callback);
+    return JSValue::encode(jsUndefined());
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;TestCallback&gt; callback;
</span><span class="cx">     if (!exec-&gt;argument(0).isUndefinedOrNull()) {
</span><del>-        if (!exec-&gt;uncheckedArgument(0).isFunction())
</del><ins>+        if (!exec-&gt;uncheckedArgument(0).isObject())
</ins><span class="cx">             return throwArgumentMustBeFunctionError(*exec, 0, &quot;callback&quot;, &quot;TestObj&quot;, &quot;staticMethodWithCallbackAndOptionalArg&quot;);
</span><span class="cx">         callback = createFunctionOnlyCallback&lt;JSTestCallback&gt;(exec, jsCast&lt;JSDOMGlobalObject*&gt;(exec-&gt;lexicalGlobalObject()), exec-&gt;uncheckedArgument(0));
</span><span class="cx">     }
</span><span class="lines">@@ -3660,7 +3725,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (UNLIKELY(exec-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(exec, createNotEnoughArgumentsError(exec));
</span><del>-    if (!exec-&gt;argument(0).isFunction())
</del><ins>+    if (!exec-&gt;argument(0).isObject())
</ins><span class="cx">         return throwArgumentMustBeFunctionError(*exec, 0, &quot;callback&quot;, &quot;TestObj&quot;, &quot;staticMethodWithCallbackArg&quot;);
</span><span class="cx">     RefPtr&lt;TestCallback&gt; callback = createFunctionOnlyCallback&lt;JSTestCallback&gt;(exec, jsCast&lt;JSDOMGlobalObject*&gt;(exec-&gt;lexicalGlobalObject()), exec-&gt;uncheckedArgument(0));
</span><span class="cx">     TestObj::staticMethodWithCallbackArg(callback);
</span><span class="lines">@@ -3803,7 +3868,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     if (UNLIKELY(exec-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(exec, createNotEnoughArgumentsError(exec));
</span><del>-    if (!exec-&gt;argument(0).isFunction())
</del><ins>+    if (!exec-&gt;argument(0).isObject())
</ins><span class="cx">         return throwArgumentMustBeFunctionError(*exec, 0, &quot;callback&quot;, &quot;TestObj&quot;, &quot;overloadedMethod&quot;);
</span><span class="cx">     RefPtr&lt;TestCallback&gt; callback = JSTestCallback::create(asObject(exec-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</span><span class="cx">     impl.overloadedMethod(callback);
</span><span class="lines">@@ -3943,7 +4008,7 @@
</span><span class="cx">         return jsTestObjPrototypeFunctionOverloadedMethod3(exec);
</span><span class="cx">     if (argsCount == 1)
</span><span class="cx">         return jsTestObjPrototypeFunctionOverloadedMethod4(exec);
</span><del>-    if ((argsCount == 1 &amp;&amp; (arg0.isNull() || arg0.isFunction())))
</del><ins>+    if ((argsCount == 1 &amp;&amp; (arg0.isNull() || arg0.isObject())))
</ins><span class="cx">         return jsTestObjPrototypeFunctionOverloadedMethod5(exec);
</span><span class="cx">     if ((argsCount == 1 &amp;&amp; (arg0.isNull() || (arg0.isObject() &amp;&amp; asObject(arg0)-&gt;inherits(JSDOMStringList::info())))))
</span><span class="cx">         return jsTestObjPrototypeFunctionOverloadedMethod6(exec);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx">     String hello = exec-&gt;argument(0).toString(exec)-&gt;value(exec);
</span><span class="cx">     if (UNLIKELY(exec-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    if (!exec-&gt;argument(1).isFunction())
</del><ins>+    if (!exec-&gt;argument(1).isObject())
</ins><span class="cx">         return throwArgumentMustBeFunctionError(*exec, 1, &quot;testCallback&quot;, &quot;TestTypedefs&quot;, nullptr);
</span><span class="cx">     RefPtr&lt;TestCallback&gt; testCallback = JSTestCallback::create(asObject(exec-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</span><span class="cx">     RefPtr&lt;TestTypedefs&gt; object = TestTypedefs::create(hello, testCallback);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestCallbackFunctionhfromrev188993trunkSourceWebCorehtmlVoidCallbackidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunction.h (from rev 188993, trunk/Source/WebCore/html/VoidCallback.idl) (0 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunction.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunction.h        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -0,0 +1,46 @@
</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 DOMClass5;
+@class DOMClass6;
+@class DOMDOMStringList;
+@class DOMFloat32Array;
+@class DOMTestNode;
+@class NSString;
+
+WEBKIT_CLASS_AVAILABLE_MAC(9876_5)
+WEBCORE_EXPORT @interface DOMTestCallbackFunction : DOMObject
+- (BOOL)callbackWithNoParam;
+- (BOOL)callbackWithArrayParam:(DOMFloat32Array *)arrayParam;
+- (BOOL)callbackWithSerializedScriptValueParam:(NSString *)srzParam strArg:(NSString *)strArg;
+- (int)callbackWithNonBoolReturnType:(NSString *)strArg;
+- (int)customCallback:(DOMClass5 *)class5Param class6Param:(DOMClass6 *)class6Param;
+- (BOOL)callbackWithStringList:(DOMDOMStringList *)listParam;
+- (BOOL)callbackWithBoolean:(BOOL)boolParam;
+- (BOOL)callbackRequiresThisToPass:(int)longParam testNodeParam:(DOMTestNode *)testNodeParam;
+@end
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestCallbackFunctionmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm (0 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -0,0 +1,146 @@
</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;
+
+#if ENABLE(SPEECH_SYNTHESIS)
+
+#import &quot;DOMInternal.h&quot;
+
+#import &quot;DOMTestCallbackFunction.h&quot;
+
+#import &quot;Class5.h&quot;
+#import &quot;Class6.h&quot;
+#import &quot;DOMClass5Internal.h&quot;
+#import &quot;DOMClass6Internal.h&quot;
+#import &quot;DOMDOMStringListInternal.h&quot;
+#import &quot;DOMFloat32ArrayInternal.h&quot;
+#import &quot;DOMNodeInternal.h&quot;
+#import &quot;DOMStringList.h&quot;
+#import &quot;DOMTestCallbackFunctionInternal.h&quot;
+#import &quot;DOMTestNodeInternal.h&quot;
+#import &quot;ExceptionHandlers.h&quot;
+#import &quot;JSMainThreadExecState.h&quot;
+#import &quot;SerializedScriptValue.h&quot;
+#import &quot;TestCallbackFunction.h&quot;
+#import &quot;TestNode.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::TestCallbackFunction*&gt;(_internal)
+
+@implementation DOMTestCallbackFunction
+
+- (void)dealloc
+{
+    if (WebCoreObjCScheduleDeallocateOnMainThread([DOMTestCallbackFunction class], self))
+        return;
+
+    if (_internal)
+        IMPL-&gt;deref();
+    [super dealloc];
+}
+
+- (void)finalize
+{
+    if (_internal)
+        IMPL-&gt;deref();
+    [super finalize];
+}
+
+- (BOOL)callbackWithNoParam
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL-&gt;callbackWithNoParam();
+}
+
+- (BOOL)callbackWithArrayParam:(DOMFloat32Array *)arrayParam
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL-&gt;callbackWithArrayParam(core(arrayParam));
+}
+
+- (BOOL)callbackWithSerializedScriptValueParam:(NSString *)srzParam strArg:(NSString *)strArg
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL-&gt;callbackWithSerializedScriptValueParam(WebCore::SerializedScriptValue::create(WTF::String(srzParam)), strArg);
+}
+
+- (int)callbackWithNonBoolReturnType:(NSString *)strArg
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL-&gt;callbackWithNonBoolReturnType(strArg);
+}
+
+- (int)customCallback:(DOMClass5 *)class5Param class6Param:(DOMClass6 *)class6Param
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL-&gt;customCallback(core(class5Param), core(class6Param));
+}
+
+- (BOOL)callbackWithStringList:(DOMDOMStringList *)listParam
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL-&gt;callbackWithStringList(core(listParam));
+}
+
+- (BOOL)callbackWithBoolean:(BOOL)boolParam
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL-&gt;callbackWithBoolean(boolParam);
+}
+
+- (BOOL)callbackRequiresThisToPass:(int)longParam testNodeParam:(DOMTestNode *)testNodeParam
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL-&gt;callbackRequiresThisToPass(longParam, core(testNodeParam));
+}
+
+@end
+
+WebCore::TestCallbackFunction* core(DOMTestCallbackFunction *wrapper)
+{
+    return wrapper ? reinterpret_cast&lt;WebCore::TestCallbackFunction*&gt;(wrapper-&gt;_internal) : 0;
+}
+
+DOMTestCallbackFunction *kit(WebCore::TestCallbackFunction* value)
+{
+    WebCoreThreadViolationCheckRoundOne();
+    if (!value)
+        return nil;
+    if (DOMTestCallbackFunction *wrapper = getDOMWrapper(value))
+        return [[wrapper retain] autorelease];
+    DOMTestCallbackFunction *wrapper = [[DOMTestCallbackFunction alloc] _init];
+    wrapper-&gt;_internal = reinterpret_cast&lt;DOMObjectInternal*&gt;(value);
+    value-&gt;ref();
+    addDOMWrapper(wrapper, value);
+    return [wrapper autorelease];
+}
+
+#endif // ENABLE(SPEECH_SYNTHESIS)
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestCallbackFunctionInternalhfromrev188993trunkSourceWebCorehtmlVoidCallbackidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunctionInternal.h (from rev 188993, trunk/Source/WebCore/html/VoidCallback.idl) (0 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunctionInternal.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunctionInternal.h        2015-08-26 22:09:29 UTC (rev 188994)
</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/DOMTestCallbackFunction.h&gt;
+
+namespace WebCore {
+class TestCallbackFunction;
+}
+
+WEBCORE_EXPORT WebCore::TestCallbackFunction* core(DOMTestCallbackFunction *);
+WEBCORE_EXPORT DOMTestCallbackFunction *kit(WebCore::TestCallbackFunction*);
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestCallbackFunctionidlfromrev188993trunkSourceWebCoreModuleswebdatabaseSQLStatementCallbackidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/scripts/test/TestCallbackFunction.idl (from rev 188993, trunk/Source/WebCore/Modules/webdatabase/SQLStatementCallback.idl) (0 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestCallbackFunction.idl                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/TestCallbackFunction.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary formstrArg, 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.
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIEstrArg, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// This IDL file is for testing the bindings code generator with function only callback
+// interface and for tracking changes in its ouput.
+[
+    Conditional=SPEECH_SYNTHESIS,
+    Callback=FunctionOnly,
+] callback interface TestCallbackFunction {
+  boolean callbackWithNoParam();
+  boolean callbackWithArrayParam(Float32Array arrayParam);
+  boolean callbackWithSerializedScriptValueParam(SerializedScriptValue srzParam, DOMString strArg);
+  long callbackWithNonBoolReturnType(DOMString strArg);
+  [Custom] long customCallback(Class5 class5Param, Class6 class6Param);
+  boolean callbackWithStringList(DOMStringList listParam);
+  boolean callbackWithBoolean(boolean boolParam);
+  boolean callbackRequiresThisToPass(long longParam, TestNode testNodeParam);
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> enum _optional { &quot;&quot;, &quot;OptionalValue1&quot;, &quot;OptionalValue2&quot;, &quot;OptionalValue3&quot; };
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    Constructor(TestCallback testCallback),
</del><ins>+    Constructor(TestCallback testCallback, TestCallbackFunction testCallbackFunction),
</ins><span class="cx">     InterfaceName=TestObject
</span><span class="cx"> ] interface TestObj {
</span><span class="cx">     // Attributes
</span><span class="lines">@@ -146,10 +146,16 @@
</span><span class="cx">     void    methodWithOptionalStringIsNullString([Default=NullString] optional DOMString str);
</span><span class="cx"> 
</span><span class="cx"> #if defined(TESTING_JS)
</span><del>-    // 'Callback' extended attribute
</del><ins>+    // Callback interface parameters.
</ins><span class="cx">     void    methodWithCallbackArg(TestCallback callback);
</span><span class="cx">     void    methodWithNonCallbackArgAndCallbackArg(long nonCallback, TestCallback callback);
</span><span class="cx">     void    methodWithCallbackAndOptionalArg(optional TestCallback callback);
</span><ins>+
+    // Callback function parameters.
+    void    methodWithCallbackFunctionArg(TestCallbackFunction callback);
+    void    methodWithNonCallbackArgAndCallbackFunctionArg(long nonCallback, TestCallbackFunction callback);
+    void    methodWithCallbackFunctionAndOptionalArg(optional TestCallbackFunction callback);
+
</ins><span class="cx">     // static methods with 'Callback' extended attribute
</span><span class="cx">     static void    staticMethodWithCallbackAndOptionalArg(optional TestCallback callback);
</span><span class="cx">     static void    staticMethodWithCallbackArg(TestCallback callback);
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaQueryListListeneridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaQueryListListener.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaQueryListListener.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/css/MediaQueryListListener.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -19,6 +19,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     CallbackNeedsOperatorEqual,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface MediaQueryListListener {
</span><span class="cx">     boolean queryChanged([Default=Undefined] optional MediaQueryList list);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoredomRequestAnimationFrameCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/RequestAnimationFrameCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/RequestAnimationFrameCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/dom/RequestAnimationFrameCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=REQUEST_ANIMATION_FRAME,
</span><ins>+    Callback=FunctionOnly,
</ins><span class="cx"> ] callback interface RequestAnimationFrameCallback {
</span><span class="cx">     // highResTime is passed as high resolution timestamp, see
</span><span class="cx">     // http://www.w3.org/TR/hr-time/ for details.
</span></span></pre></div>
<a id="trunkSourceWebCoredomStringCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/StringCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/StringCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/dom/StringCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-callback interface StringCallback {
</del><ins>+[
+    Callback=FunctionOnly,
+] callback interface StringCallback {
</ins><span class="cx">     boolean handleEvent(DOMString data);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlVoidCallbackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/VoidCallback.idl (188993 => 188994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/VoidCallback.idl        2015-08-26 22:07:18 UTC (rev 188993)
+++ trunk/Source/WebCore/html/VoidCallback.idl        2015-08-26 22:09:29 UTC (rev 188994)
</span><span class="lines">@@ -22,7 +22,8 @@
</span><span class="cx">  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
</span><span class="cx">  */
</span><del>-
-callback interface VoidCallback {
</del><ins>+[
+    Callback=FunctionOnly,
+] callback interface VoidCallback {
</ins><span class="cx">     boolean handleEvent();
</span><span class="cx"> };
</span></span></pre>
</div>
</div>

</body>
</html>