<!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 <cdumez@apple.com>
+
+ 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 <fpizlo@apple.com>
</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->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 && m_impl->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 <cdumez@apple.com>
+
+ 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 <bdakin@apple.com>
</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<SourceInfo> 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<JSCallbackData*>(context);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-JSValue JSCallbackData::invokeCallback(MarkedArgumentBuffer& args, PropertyName functionName, bool* raisedException)
</del><ins>+JSValue JSCallbackData::invokeCallback(MarkedArgumentBuffer& 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& args, PropertyName functionName, bool* raisedException)
</del><ins>+JSValue JSCallbackData::invokeCallback(JSValue thisValue, MarkedArgumentBuffer& 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()->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()->methodTable()->getCallData(callback(), callData);
</del><ins>+ if (method != CallbackType::Object) {
+ function = callback();
+ callType = callback()->methodTable()->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()->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()->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&, JSC::PropertyName functionName, bool* raisedException = nullptr);
- JSC::JSValue invokeCallback(JSC::JSValue thisValue, JSC::MarkedArgumentBuffer&, JSC::PropertyName functionName, bool* raisedException = nullptr);
</del><ins>+ enum class CallbackType { Function, Object, FunctionOrObject };
+ JSC::JSValue invokeCallback(JSC::MarkedArgumentBuffer&, CallbackType, JSC::PropertyName functionName, bool* raisedException = nullptr);
+ JSC::JSValue invokeCallback(JSC::JSValue thisValue, JSC::MarkedArgumentBuffer&, CallbackType, JSC::PropertyName functionName, bool* raisedException = nullptr);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> JSC::Strong<JSC::JSObject> 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->globalObject(), error));
</span><span class="cx">
</span><span class="cx"> bool raisedException = false;
</span><del>- JSValue result = m_data->invokeCallback(args, Identifier::fromString(exec, "handleEvent"), &raisedException);
</del><ins>+ JSValue result = m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &raisedException);
</ins><span class="cx"> if (raisedException) {
</span><span class="cx"> // The spec says:
</span><span class="cx"> // "If the error callback returns false, then move on to the next statement..."
</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->IsCallbackInterface($type);
+
+ my $idlFile = $object->IDLFileForInterface($type)
+ or die("Could NOT find IDL file for interface \"$type\"!\n");
+
+ open FILE, "<", $idlFile;
+ my @lines = <FILE>;
+ 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 = "VALUE_IS_MISSING";
+ $value = trim($keyValue[1]) if @keyValue > 1;
+
+ return 1 if ($key eq "Callback" && $value eq "FunctionOnly");
+ }
+ }
+
+ 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->IsCallbackInterface($parameter->type)) {
</span><span class="cx"> # For Callbacks only checks if the value is null or object.
</span><del>- push(@andExpression, "(${value}.isNull() || ${value}.isFunction())");
</del><ins>+ if ($codeGenerator->IsFunctionOnlyCallbackInterface($parameter->type)) {
+ push(@andExpression, "(${value}.isNull() || ${value}.isFunction())");
+ } else {
+ push(@andExpression, "(${value}.isNull() || ${value}.isObject())");
+ }
</ins><span class="cx"> $usedArguments{$parameterIndex} = 1;
</span><span class="cx"> } elsif (!IsNativeType($type)) {
</span><span class="cx"> my $condition = "";
</span><span class="lines">@@ -3271,7 +3275,11 @@
</span><span class="cx"> if ($optional) {
</span><span class="cx"> push(@$outputArray, " RefPtr<$argType> $name;\n");
</span><span class="cx"> push(@$outputArray, " if (!exec->argument($argsIndex).isUndefinedOrNull()) {\n");
</span><del>- push(@$outputArray, " if (!exec->uncheckedArgument($argsIndex).isFunction())\n");
</del><ins>+ if ($codeGenerator->IsFunctionOnlyCallbackInterface($parameter->type)) {
+ push(@$outputArray, " if (!exec->uncheckedArgument($argsIndex).isFunction())\n");
+ } else {
+ push(@$outputArray, " if (!exec->uncheckedArgument($argsIndex).isObject())\n");
+ }
</ins><span class="cx"> push(@$outputArray, " return throwArgumentMustBeFunctionError(*exec, $argsIndex, \"$name\", \"$interfaceName\", $quotedFunctionName);\n");
</span><span class="cx"> if ($function->isStatic) {
</span><span class="cx"> AddToImplIncludes("CallbackFunction.h");
</span><span class="lines">@@ -3281,7 +3289,11 @@
</span><span class="cx"> }
</span><span class="cx"> push(@$outputArray, " }\n");
</span><span class="cx"> } else {
</span><del>- push(@$outputArray, " if (!exec->argument($argsIndex).isFunction())\n");
</del><ins>+ if ($codeGenerator->IsFunctionOnlyCallbackInterface($parameter->type)) {
+ push(@$outputArray, " if (!exec->argument($argsIndex).isFunction())\n");
+ } else {
+ push(@$outputArray, " if (!exec->argument($argsIndex).isObject())\n");
+ }
</ins><span class="cx"> push(@$outputArray, " return throwArgumentMustBeFunctionError(*exec, $argsIndex, \"$name\", \"$interfaceName\", $quotedFunctionName);\n");
</span><span class="cx"> if ($function->isStatic) {
</span><span class="cx"> AddToImplIncludes("CallbackFunction.h");
</span><span class="lines">@@ -3598,7 +3610,22 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> push(@implContent, "\n bool raisedException = false;\n");
</span><del>- push(@implContent, " m_data->invokeCallback(args, Identifier::fromString(exec, \"${functionName}\"), &raisedException);\n");
</del><ins>+
+ my $propertyToLookup = "Identifier::fromString(exec, \"${functionName}\")";
+ my $invokeMethod = "JSCallbackData::CallbackType::FunctionOrObject";
+ if ($codeGenerator->ExtendedAttributeContains($interface->extendedAttributes->{"Callback"}, "FunctionOnly")) {
+ # For callback functions, do not look up callable property on the user object.
+ # https://heycam.github.io/webidl/#es-callback-function
+ $invokeMethod = "JSCallbackData::CallbackType::Function";
+ $propertyToLookup = "Identifier()";
+ push(@implContent, " UNUSED_PARAM(exec);\n");
+ } elsif ($numFunctions > 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 = "JSCallbackData::CallbackType::Object";
+ }
+ push(@implContent, " m_data->invokeCallback(args, $invokeMethod, $propertyToLookup, &raisedException);\n");
</ins><span class="cx"> push(@implContent, " return !raisedException;\n");
</span><span class="cx"> push(@implContent, "}\n");
</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 "config.h"
+#include "WebKitDOMTestCallbackFunction.h"
+
+#include "CSSImportRule.h"
+#include "DOMObjectCache.h"
+#include "Document.h"
+#include "ExceptionCode.h"
+#include "ExceptionCodeDescription.h"
+#include "JSMainThreadExecState.h"
+#include "SerializedScriptValue.h"
+#include "WebKitDOMDOMStringListPrivate.h"
+#include "WebKitDOMFloat32ArrayPrivate.h"
+#include "WebKitDOMPrivate.h"
+#include "WebKitDOMTestCallbackFunctionPrivate.h"
+#include "WebKitDOMTestNodePrivate.h"
+#include "gobject/ConvertToUTF8String.h"
+#include <wtf/GetPtr.h>
+#include <wtf/RefPtr.h>
+
+#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<WebCore::TestCallbackFunction> 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<WebCore::TestCallbackFunction*>(WEBKIT_DOM_OBJECT(request)->coreObject) : 0;
+}
+
+WebKitDOMTestCallbackFunction* wrapTestCallbackFunction(WebCore::TestCallbackFunction* coreObject)
+{
+ ASSERT(coreObject);
+ return WEBKIT_DOM_TEST_CALLBACK_FUNCTION(g_object_new(WEBKIT_DOM_TYPE_TEST_CALLBACK_FUNCTION, "core-object", 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->coreObject.get());
+#endif // ENABLE(SPEECH_SYNTHESIS)
+ priv->~WebKitDOMTestCallbackFunctionPrivate();
+ G_OBJECT_CLASS(webkit_dom_test_callback_function_parent_class)->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)->constructor(type, constructPropertiesCount, constructProperties);
+#if ENABLE(SPEECH_SYNTHESIS)
+ WebKitDOMTestCallbackFunctionPrivate* priv = WEBKIT_DOM_TEST_CALLBACK_FUNCTION_GET_PRIVATE(object);
+ priv->coreObject = static_cast<WebCore::TestCallbackFunction*>(WEBKIT_DOM_OBJECT(object)->coreObject);
+ WebKit::DOMObjectCache::put(priv->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->constructor = webkit_dom_test_callback_function_constructor;
+ gobjectClass->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->callbackWithNoParam();
+ return result;
+#else
+ UNUSED_PARAM(self);
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Speech Synthesis")
+ return static_cast<gboolean>(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->callbackWithArrayParam(convertedArrayParam);
+ return result;
+#else
+ UNUSED_PARAM(self);
+ UNUSED_PARAM(arrayParam);
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Speech Synthesis")
+ return static_cast<gboolean>(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->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("Speech Synthesis")
+ return static_cast<gboolean>(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->callbackWithNonBoolReturnType(convertedStrArg);
+ return result;
+#else
+ UNUSED_PARAM(self);
+ UNUSED_PARAM(strArg);
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Speech Synthesis")
+ return static_cast<glong>(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->callbackWithStringList(convertedListParam);
+ return result;
+#else
+ UNUSED_PARAM(self);
+ UNUSED_PARAM(listParam);
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Speech Synthesis")
+ return static_cast<gboolean>(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->callbackWithBoolean(boolParam);
+ return result;
+#else
+ UNUSED_PARAM(self);
+ UNUSED_PARAM(boolParam);
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Speech Synthesis")
+ return static_cast<gboolean>(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->callbackRequiresThisToPass(longParam, convertedTestNodeParam);
+ return result;
+#else
+ UNUSED_PARAM(self);
+ UNUSED_PARAM(longParam);
+ UNUSED_PARAM(testNodeParam);
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Speech Synthesis")
+ return static_cast<gboolean>(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 <glib-object.h>
+#include <webkitdom/WebKitDOMObject.h>
+#include <webkitdom/webkitdomdefines-unstable.h>
+
+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 "TestCallbackFunction.h"
+#include <webkitdom/WebKitDOMTestCallbackFunction.h>
+#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->invokeCallback(args, Identifier::fromString(exec, "callbackWithNoParam"), &raisedException);
</del><ins>+ m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithNoParam"), &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->globalObject(), WTF::getPtr(arrayParam)));
</span><span class="cx">
</span><span class="cx"> bool raisedException = false;
</span><del>- m_data->invokeCallback(args, Identifier::fromString(exec, "callbackWithArrayParam"), &raisedException);
</del><ins>+ m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithArrayParam"), &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->invokeCallback(args, Identifier::fromString(exec, "callbackWithSerializedScriptValueParam"), &raisedException);
</del><ins>+ m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithSerializedScriptValueParam"), &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->globalObject(), WTF::getPtr(listParam)));
</span><span class="cx">
</span><span class="cx"> bool raisedException = false;
</span><del>- m_data->invokeCallback(args, Identifier::fromString(exec, "callbackWithStringList"), &raisedException);
</del><ins>+ m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithStringList"), &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->invokeCallback(args, Identifier::fromString(exec, "callbackWithBoolean"), &raisedException);
</del><ins>+ m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithBoolean"), &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->globalObject(), WTF::getPtr(testNodeParam)));
</span><span class="cx">
</span><span class="cx"> bool raisedException = false;
</span><del>- m_data->invokeCallback(args, Identifier::fromString(exec, "callbackRequiresThisToPass"), &raisedException);
</del><ins>+ m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackRequiresThisToPass"), &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 "config.h"
+
+#if ENABLE(SPEECH_SYNTHESIS)
+
+#include "JSTestCallbackFunction.h"
+
+#include "DOMStringList.h"
+#include "JSDOMStringList.h"
+#include "JSTestNode.h"
+#include "ScriptExecutionContext.h"
+#include "SerializedScriptValue.h"
+#include "TestNode.h"
+#include "URL.h"
+#include <runtime/JSLock.h>
+#include <runtime/JSString.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSTestCallbackFunction::JSTestCallbackFunction(JSObject* callback, JSDOMGlobalObject* globalObject)
+ : TestCallbackFunction()
+ , ActiveDOMCallback(globalObject->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->isContextThread())
+ delete m_data;
+ else
+ context->postTask(DeleteCallbackDataTask(m_data));
+#ifndef NDEBUG
+ m_data = 0;
+#endif
+}
+
+
+// Functions
+
+bool JSTestCallbackFunction::callbackWithNoParam()
+{
+ if (!canInvokeCallback())
+ return true;
+
+ Ref<JSTestCallbackFunction> protect(*this);
+
+ JSLockHolder lock(m_data->globalObject()->vm());
+
+ ExecState* exec = m_data->globalObject()->globalExec();
+ MarkedArgumentBuffer args;
+
+ bool raisedException = false;
+ UNUSED_PARAM(exec);
+ m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &raisedException);
+ return !raisedException;
+}
+
+bool JSTestCallbackFunction::callbackWithArrayParam(RefPtr<Float32Array> arrayParam)
+{
+ if (!canInvokeCallback())
+ return true;
+
+ Ref<JSTestCallbackFunction> protect(*this);
+
+ JSLockHolder lock(m_data->globalObject()->vm());
+
+ ExecState* exec = m_data->globalObject()->globalExec();
+ MarkedArgumentBuffer args;
+ args.append(toJS(exec, m_data->globalObject(), WTF::getPtr(arrayParam)));
+
+ bool raisedException = false;
+ UNUSED_PARAM(exec);
+ m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &raisedException);
+ return !raisedException;
+}
+
+bool JSTestCallbackFunction::callbackWithSerializedScriptValueParam(PassRefPtr<SerializedScriptValue> srzParam, const String& strArg)
+{
+ if (!canInvokeCallback())
+ return true;
+
+ Ref<JSTestCallbackFunction> protect(*this);
+
+ JSLockHolder lock(m_data->globalObject()->vm());
+
+ ExecState* exec = m_data->globalObject()->globalExec();
+ MarkedArgumentBuffer args;
+ args.append(srzParam ? srzParam->deserialize(exec, castedThis->globalObject(), 0) : jsNull());
+ args.append(jsStringWithCache(exec, strArg));
+
+ bool raisedException = false;
+ UNUSED_PARAM(exec);
+ m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &raisedException);
+ return !raisedException;
+}
+
+bool JSTestCallbackFunction::callbackWithStringList(PassRefPtr<DOMStringList> listParam)
+{
+ if (!canInvokeCallback())
+ return true;
+
+ Ref<JSTestCallbackFunction> protect(*this);
+
+ JSLockHolder lock(m_data->globalObject()->vm());
+
+ ExecState* exec = m_data->globalObject()->globalExec();
+ MarkedArgumentBuffer args;
+ args.append(toJS(exec, m_data->globalObject(), WTF::getPtr(listParam)));
+
+ bool raisedException = false;
+ UNUSED_PARAM(exec);
+ m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &raisedException);
+ return !raisedException;
+}
+
+bool JSTestCallbackFunction::callbackWithBoolean(bool boolParam)
+{
+ if (!canInvokeCallback())
+ return true;
+
+ Ref<JSTestCallbackFunction> protect(*this);
+
+ JSLockHolder lock(m_data->globalObject()->vm());
+
+ ExecState* exec = m_data->globalObject()->globalExec();
+ MarkedArgumentBuffer args;
+ args.append(jsBoolean(boolParam));
+
+ bool raisedException = false;
+ UNUSED_PARAM(exec);
+ m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &raisedException);
+ return !raisedException;
+}
+
+bool JSTestCallbackFunction::callbackRequiresThisToPass(int longParam, TestNode* testNodeParam)
+{
+ if (!canInvokeCallback())
+ return true;
+
+ Ref<JSTestCallbackFunction> protect(*this);
+
+ JSLockHolder lock(m_data->globalObject()->vm());
+
+ ExecState* exec = m_data->globalObject()->globalExec();
+ MarkedArgumentBuffer args;
+ args.append(jsNumber(longParam));
+ args.append(toJS(exec, m_data->globalObject(), WTF::getPtr(testNodeParam)));
+
+ bool raisedException = false;
+ UNUSED_PARAM(exec);
+ m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &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 "ActiveDOMCallback.h"
+#include "JSCallbackData.h"
+#include "TestCallbackFunction.h"
+#include <wtf/Forward.h>
+
+namespace WebCore {
+
+class JSTestCallbackFunction : public TestCallbackFunction, public ActiveDOMCallback {
+public:
+ static Ref<JSTestCallbackFunction> 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<Float32Array> arrayParam);
+ virtual bool callbackWithSerializedScriptValueParam(PassRefPtr<SerializedScriptValue> srzParam, const String& strArg);
+ COMPILE_ASSERT(false) virtual int callbackWithNonBoolReturnType(const String& strArg);
+ virtual int customCallback(Class5* class5Param, Class6* class6Param);
+ virtual bool callbackWithStringList(PassRefPtr<DOMStringList> 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 "JSSVGPoint.h"
</span><span class="cx"> #include "JSScriptProfile.h"
</span><span class="cx"> #include "JSTestCallback.h"
</span><ins>+#include "JSTestCallbackFunction.h"
</ins><span class="cx"> #include "JSTestNode.h"
</span><span class="cx"> #include "JSTestObj.h"
</span><span class="cx"> #include "JSTestSubObj.h"
</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<JSTestObjConstructor*>(exec->callee());
</span><del>- if (UNLIKELY(exec->argumentCount() < 1))
</del><ins>+ if (UNLIKELY(exec->argumentCount() < 2))
</ins><span class="cx"> return throwVMError(exec, createNotEnoughArgumentsError(exec));
</span><del>- if (!exec->argument(0).isFunction())
</del><ins>+ if (!exec->argument(0).isObject())
</ins><span class="cx"> return throwArgumentMustBeFunctionError(*exec, 0, "testCallback", "TestObj", nullptr);
</span><span class="cx"> RefPtr<TestCallback> testCallback = JSTestCallback::create(asObject(exec->uncheckedArgument(0)), castedThis->globalObject());
</span><del>- RefPtr<TestObj> object = TestObj::create(testCallback);
</del><ins>+ if (!exec->argument(1).isFunction())
+ return throwArgumentMustBeFunctionError(*exec, 1, "testCallbackFunction", "TestObj", nullptr);
+ RefPtr<TestCallbackFunction> testCallbackFunction = JSTestCallbackFunction::create(asObject(exec->uncheckedArgument(1)), castedThis->globalObject());
+ RefPtr<TestObj> object = TestObj::create(testCallback, testCallbackFunction);
</ins><span class="cx"> return JSValue::encode(asObject(toJS(exec, castedThis->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->prototype, JSTestObj::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
</span><span class="cx"> putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestObject"))), ReadOnly | DontEnum);
</span><del>- putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
</del><ins>+ putDirect(vm, vm.propertyNames->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"> { "methodWithCallbackArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackArg), (intptr_t) (1) },
</span><span class="cx"> { "methodWithNonCallbackArgAndCallbackArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg), (intptr_t) (2) },
</span><span class="cx"> { "methodWithCallbackAndOptionalArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg), (intptr_t) (0) },
</span><ins>+ { "methodWithCallbackFunctionArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg), (intptr_t) (1) },
+ { "methodWithNonCallbackArgAndCallbackFunctionArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg), (intptr_t) (2) },
+ { "methodWithCallbackFunctionAndOptionalArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg), (intptr_t) (0) },
</ins><span class="cx"> #if ENABLE(Condition1)
</span><span class="cx"> { "conditionalMethod1", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod1), (intptr_t) (0) },
</span><span class="cx"> #else
</span><span class="lines">@@ -3599,7 +3609,7 @@
</span><span class="cx"> auto& impl = castedThis->impl();
</span><span class="cx"> if (UNLIKELY(exec->argumentCount() < 1))
</span><span class="cx"> return throwVMError(exec, createNotEnoughArgumentsError(exec));
</span><del>- if (!exec->argument(0).isFunction())
</del><ins>+ if (!exec->argument(0).isObject())
</ins><span class="cx"> return throwArgumentMustBeFunctionError(*exec, 0, "callback", "TestObj", "methodWithCallbackArg");
</span><span class="cx"> RefPtr<TestCallback> callback = JSTestCallback::create(asObject(exec->uncheckedArgument(0)), castedThis->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->argument(0), NormalConversion);
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><del>- if (!exec->argument(1).isFunction())
</del><ins>+ if (!exec->argument(1).isObject())
</ins><span class="cx"> return throwArgumentMustBeFunctionError(*exec, 1, "callback", "TestObj", "methodWithNonCallbackArgAndCallbackArg");
</span><span class="cx"> RefPtr<TestCallback> callback = JSTestCallback::create(asObject(exec->uncheckedArgument(1)), castedThis->globalObject());
</span><span class="cx"> impl.methodWithNonCallbackArgAndCallbackArg(nonCallback, callback);
</span><span class="lines">@@ -3636,7 +3646,7 @@
</span><span class="cx"> auto& impl = castedThis->impl();
</span><span class="cx"> RefPtr<TestCallback> callback;
</span><span class="cx"> if (!exec->argument(0).isUndefinedOrNull()) {
</span><del>- if (!exec->uncheckedArgument(0).isFunction())
</del><ins>+ if (!exec->uncheckedArgument(0).isObject())
</ins><span class="cx"> return throwArgumentMustBeFunctionError(*exec, 0, "callback", "TestObj", "methodWithCallbackAndOptionalArg");
</span><span class="cx"> callback = JSTestCallback::create(asObject(exec->uncheckedArgument(0)), castedThis->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->thisValue();
+ JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
+ if (UNLIKELY(!castedThis))
+ return throwThisTypeError(*exec, "TestObj", "methodWithCallbackFunctionArg");
+ ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+ auto& impl = castedThis->impl();
+ if (UNLIKELY(exec->argumentCount() < 1))
+ return throwVMError(exec, createNotEnoughArgumentsError(exec));
+ if (!exec->argument(0).isFunction())
+ return throwArgumentMustBeFunctionError(*exec, 0, "callback", "TestObj", "methodWithCallbackFunctionArg");
+ RefPtr<TestCallbackFunction> callback = JSTestCallbackFunction::create(asObject(exec->uncheckedArgument(0)), castedThis->globalObject());
+ impl.methodWithCallbackFunctionArg(callback);
+ return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg(ExecState* exec)
+{
+ JSValue thisValue = exec->thisValue();
+ JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
+ if (UNLIKELY(!castedThis))
+ return throwThisTypeError(*exec, "TestObj", "methodWithNonCallbackArgAndCallbackFunctionArg");
+ ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+ auto& impl = castedThis->impl();
+ if (UNLIKELY(exec->argumentCount() < 2))
+ return throwVMError(exec, createNotEnoughArgumentsError(exec));
+ int nonCallback = toInt32(exec, exec->argument(0), NormalConversion);
+ if (UNLIKELY(exec->hadException()))
+ return JSValue::encode(jsUndefined());
+ if (!exec->argument(1).isFunction())
+ return throwArgumentMustBeFunctionError(*exec, 1, "callback", "TestObj", "methodWithNonCallbackArgAndCallbackFunctionArg");
+ RefPtr<TestCallbackFunction> callback = JSTestCallbackFunction::create(asObject(exec->uncheckedArgument(1)), castedThis->globalObject());
+ impl.methodWithNonCallbackArgAndCallbackFunctionArg(nonCallback, callback);
+ return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg(ExecState* exec)
+{
+ JSValue thisValue = exec->thisValue();
+ JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
+ if (UNLIKELY(!castedThis))
+ return throwThisTypeError(*exec, "TestObj", "methodWithCallbackFunctionAndOptionalArg");
+ ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+ auto& impl = castedThis->impl();
+ RefPtr<TestCallbackFunction> callback;
+ if (!exec->argument(0).isUndefinedOrNull()) {
+ if (!exec->uncheckedArgument(0).isFunction())
+ return throwArgumentMustBeFunctionError(*exec, 0, "callback", "TestObj", "methodWithCallbackFunctionAndOptionalArg");
+ callback = JSTestCallbackFunction::create(asObject(exec->uncheckedArgument(0)), castedThis->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<TestCallback> callback;
</span><span class="cx"> if (!exec->argument(0).isUndefinedOrNull()) {
</span><del>- if (!exec->uncheckedArgument(0).isFunction())
</del><ins>+ if (!exec->uncheckedArgument(0).isObject())
</ins><span class="cx"> return throwArgumentMustBeFunctionError(*exec, 0, "callback", "TestObj", "staticMethodWithCallbackAndOptionalArg");
</span><span class="cx"> callback = createFunctionOnlyCallback<JSTestCallback>(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->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->argumentCount() < 1))
</span><span class="cx"> return throwVMError(exec, createNotEnoughArgumentsError(exec));
</span><del>- if (!exec->argument(0).isFunction())
</del><ins>+ if (!exec->argument(0).isObject())
</ins><span class="cx"> return throwArgumentMustBeFunctionError(*exec, 0, "callback", "TestObj", "staticMethodWithCallbackArg");
</span><span class="cx"> RefPtr<TestCallback> callback = createFunctionOnlyCallback<JSTestCallback>(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->uncheckedArgument(0));
</span><span class="cx"> TestObj::staticMethodWithCallbackArg(callback);
</span><span class="lines">@@ -3803,7 +3868,7 @@
</span><span class="cx"> auto& impl = castedThis->impl();
</span><span class="cx"> if (UNLIKELY(exec->argumentCount() < 1))
</span><span class="cx"> return throwVMError(exec, createNotEnoughArgumentsError(exec));
</span><del>- if (!exec->argument(0).isFunction())
</del><ins>+ if (!exec->argument(0).isObject())
</ins><span class="cx"> return throwArgumentMustBeFunctionError(*exec, 0, "callback", "TestObj", "overloadedMethod");
</span><span class="cx"> RefPtr<TestCallback> callback = JSTestCallback::create(asObject(exec->uncheckedArgument(0)), castedThis->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 && (arg0.isNull() || arg0.isFunction())))
</del><ins>+ if ((argsCount == 1 && (arg0.isNull() || arg0.isObject())))
</ins><span class="cx"> return jsTestObjPrototypeFunctionOverloadedMethod5(exec);
</span><span class="cx"> if ((argsCount == 1 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->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->argument(0).toString(exec)->value(exec);
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><del>- if (!exec->argument(1).isFunction())
</del><ins>+ if (!exec->argument(1).isObject())
</ins><span class="cx"> return throwArgumentMustBeFunctionError(*exec, 1, "testCallback", "TestTypedefs", nullptr);
</span><span class="cx"> RefPtr<TestCallback> testCallback = JSTestCallback::create(asObject(exec->uncheckedArgument(1)), castedThis->globalObject());
</span><span class="cx"> RefPtr<TestTypedefs> 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 <sam.weinig@gmail.com>
+ *
+ * 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 <WebCore/DOMObject.h>
+
+@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 "config.h"
+
+#if ENABLE(SPEECH_SYNTHESIS)
+
+#import "DOMInternal.h"
+
+#import "DOMTestCallbackFunction.h"
+
+#import "Class5.h"
+#import "Class6.h"
+#import "DOMClass5Internal.h"
+#import "DOMClass6Internal.h"
+#import "DOMDOMStringListInternal.h"
+#import "DOMFloat32ArrayInternal.h"
+#import "DOMNodeInternal.h"
+#import "DOMStringList.h"
+#import "DOMTestCallbackFunctionInternal.h"
+#import "DOMTestNodeInternal.h"
+#import "ExceptionHandlers.h"
+#import "JSMainThreadExecState.h"
+#import "SerializedScriptValue.h"
+#import "TestCallbackFunction.h"
+#import "TestNode.h"
+#import "ThreadCheck.h"
+#import "URL.h"
+#import "WebCoreObjCExtras.h"
+#import "WebScriptObjectPrivate.h"
+#import <wtf/GetPtr.h>
+
+#define IMPL reinterpret_cast<WebCore::TestCallbackFunction*>(_internal)
+
+@implementation DOMTestCallbackFunction
+
+- (void)dealloc
+{
+ if (WebCoreObjCScheduleDeallocateOnMainThread([DOMTestCallbackFunction class], self))
+ return;
+
+ if (_internal)
+ IMPL->deref();
+ [super dealloc];
+}
+
+- (void)finalize
+{
+ if (_internal)
+ IMPL->deref();
+ [super finalize];
+}
+
+- (BOOL)callbackWithNoParam
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->callbackWithNoParam();
+}
+
+- (BOOL)callbackWithArrayParam:(DOMFloat32Array *)arrayParam
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->callbackWithArrayParam(core(arrayParam));
+}
+
+- (BOOL)callbackWithSerializedScriptValueParam:(NSString *)srzParam strArg:(NSString *)strArg
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->callbackWithSerializedScriptValueParam(WebCore::SerializedScriptValue::create(WTF::String(srzParam)), strArg);
+}
+
+- (int)callbackWithNonBoolReturnType:(NSString *)strArg
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->callbackWithNonBoolReturnType(strArg);
+}
+
+- (int)customCallback:(DOMClass5 *)class5Param class6Param:(DOMClass6 *)class6Param
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->customCallback(core(class5Param), core(class6Param));
+}
+
+- (BOOL)callbackWithStringList:(DOMDOMStringList *)listParam
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->callbackWithStringList(core(listParam));
+}
+
+- (BOOL)callbackWithBoolean:(BOOL)boolParam
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->callbackWithBoolean(boolParam);
+}
+
+- (BOOL)callbackRequiresThisToPass:(int)longParam testNodeParam:(DOMTestNode *)testNodeParam
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->callbackRequiresThisToPass(longParam, core(testNodeParam));
+}
+
+@end
+
+WebCore::TestCallbackFunction* core(DOMTestCallbackFunction *wrapper)
+{
+ return wrapper ? reinterpret_cast<WebCore::TestCallbackFunction*>(wrapper->_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->_internal = reinterpret_cast<DOMObjectInternal*>(value);
+ value->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 <WebCore/DOMTestCallbackFunction.h>
+
+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. ("Apple") 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 "AS IS" 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 { "", "OptionalValue1", "OptionalValue2", "OptionalValue3" };
</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>