Add support for callback interfaces using other callback names than "handleEvent"
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Aug 2015 17:04:47 +0000 (17:04 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Aug 2015 17:04:47 +0000 (17:04 +0000)
commitfcde42188ea75f4a14e59df2ae3b4361a245845d
tree426ceb28981eee843ca050acbbb877ed0a73ca4c
parentbfa24511f8cf4bca29713a761b435f6c77916ee8
Add support for callback interfaces using other callback names than "handleEvent"
https://bugs.webkit.org/show_bug.cgi?id=148418

Reviewed by Ryosuke Niwa.

Add support for callback interfaces using other callback names than
"handleEvent" [1].

This is a pre-requirement for Bug 148415, as NodeFilter's callback
function name is "acceptNode":
- https://dom.spec.whatwg.org/#interface-nodefilter

[1] https://heycam.github.io/webidl/#es-user-objects

* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSCallbackData.h:
* bindings/js/JSCustomSQLStatementErrorCallback.cpp:
(WebCore::JSSQLStatementErrorCallback::handleEvent):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation):
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithNoParam):
(WebCore::JSTestCallback::callbackWithArrayParam):
(WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
(WebCore::JSTestCallback::callbackWithStringList):
(WebCore::JSTestCallback::callbackWithBoolean):
(WebCore::JSTestCallback::callbackRequiresThisToPass):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSCallbackData.cpp
Source/WebCore/bindings/js/JSCallbackData.h
Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp