- Revision
- 152490
- Author
- [email protected]
- Date
- 2013-07-09 03:56:00 -0700 (Tue, 09 Jul 2013)
Log Message
Remove support for [PassThisToCallback] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=118391
Reviewed by Kentaro Hara.
The [PassThisToCallback] Webkit-specific IDL extended attribute is supported
by the JSC bindings generator but is no longer used. The attribute is not
even documented.
We can therefore drop support for this from the generator to simplify the
code.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/TestCallback.idl:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (152489 => 152490)
--- trunk/Source/WebCore/ChangeLog 2013-07-09 09:59:33 UTC (rev 152489)
+++ trunk/Source/WebCore/ChangeLog 2013-07-09 10:56:00 UTC (rev 152490)
@@ -1,3 +1,26 @@
+2013-07-09 Christophe Dumez <[email protected]>
+
+ Remove support for [PassThisToCallback] extended attribute
+ https://bugs.webkit.org/show_bug.cgi?id=118391
+
+ Reviewed by Kentaro Hara.
+
+ The [PassThisToCallback] Webkit-specific IDL extended attribute is supported
+ by the JSC bindings generator but is no longer used. The attribute is not
+ even documented.
+
+ We can therefore drop support for this from the generator to simplify the
+ code.
+
+ No new tests, no behavior change.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateCallbackImplementation):
+ * bindings/scripts/IDLAttributes.txt:
+ * bindings/scripts/test/JS/JSTestCallback.cpp:
+ (WebCore::JSTestCallback::callbackRequiresThisToPass):
+ * bindings/scripts/test/TestCallback.idl:
+
2013-07-09 Praveen R Jadhav <[email protected]>
Update Exception handling in WebAudio.
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (152489 => 152490)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2013-07-09 09:59:33 UTC (rev 152489)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2013-07-09 10:56:00 UTC (rev 152490)
@@ -3246,17 +3246,10 @@
my @args = ();
my @argsCheck = ();
- my $thisType = $function->signature->extendedAttributes->{"PassThisToCallback"};
foreach my $param (@params) {
my $paramName = $param->name;
AddIncludesForTypeInImpl($param->type, 1);
push(@args, GetNativeTypeForCallbacks($param->type) . " " . $paramName);
- if ($thisType and $thisType eq $param->type) {
- push(@argsCheck, <<END);
- ASSERT(${paramName});
-
-END
- }
}
push(@implContent, join(", ", @args));
push(@implContent, ")\n");
@@ -3286,20 +3279,7 @@
}
push(@implContent, "\n bool raisedException = false;\n");
- if ($thisType) {
- foreach my $param (@params) {
- next if $param->type ne $thisType;
- my $paramName = $param->name;
- push(@implContent, <<END);
- JSValue js${paramName} = toJS(exec, m_data->globalObject(), ${paramName});
- m_data->invokeCallback(js${paramName}, args, &raisedException);
-
-END
- last;
- }
- } else {
- push(@implContent, " m_data->invokeCallback(args, &raisedException);\n");
- }
+ push(@implContent, " m_data->invokeCallback(args, &raisedException);\n");
push(@implContent, " return !raisedException;\n");
push(@implContent, "}\n");
}
Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (152489 => 152490)
--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2013-07-09 09:59:33 UTC (rev 152489)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2013-07-09 10:56:00 UTC (rev 152490)
@@ -91,7 +91,6 @@
ObjCPolymorphic
ObjCProtocol
PassContext
-PassThisToCallback=*
RaisesException
Reflect=*
Replaceable
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp (152489 => 152490)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp 2013-07-09 09:59:33 UTC (rev 152489)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp 2013-07-09 10:56:00 UTC (rev 152490)
@@ -148,8 +148,6 @@
bool JSTestCallback::callbackRequiresThisToPass(int longParam, TestNode* testNodeParam)
{
- ASSERT(testNodeParam);
-
if (!canInvokeCallback())
return true;
@@ -163,9 +161,7 @@
args.append(toJS(exec, m_data->globalObject(), testNodeParam));
bool raisedException = false;
- JSValue jstestNodeParam = toJS(exec, m_data->globalObject(), testNodeParam);
- m_data->invokeCallback(jstestNodeParam, args, &raisedException);
-
+ m_data->invokeCallback(args, &raisedException);
return !raisedException;
}
Modified: trunk/Source/WebCore/bindings/scripts/test/TestCallback.idl (152489 => 152490)
--- trunk/Source/WebCore/bindings/scripts/test/TestCallback.idl 2013-07-09 09:59:33 UTC (rev 152489)
+++ trunk/Source/WebCore/bindings/scripts/test/TestCallback.idl 2013-07-09 10:56:00 UTC (rev 152490)
@@ -38,5 +38,5 @@
[Custom] long customCallback(Class5 class5Param, Class6 class6Param);
boolean callbackWithStringList(DOMStringList listParam);
boolean callbackWithBoolean(boolean boolParam);
- [PassThisToCallback=TestNode] boolean callbackRequiresThisToPass(long longParam, TestNode testNodeParam);
+ boolean callbackRequiresThisToPass(long longParam, TestNode testNodeParam);
};