Title: [123439] trunk/Source/WebCore
- Revision
- 123439
- Author
- hara...@chromium.org
- Date
- 2012-07-24 01:44:58 -0700 (Tue, 24 Jul 2012)
Log Message
[JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code
for static attributes in supplemental IDL files
https://bugs.webkit.org/show_bug.cgi?id=91925
Reviewed by Adam Barth.
r122912 implemented static attributes in CodeGeneratorJS.pm.
However, it generates wrong code for static attributes in supplemental
IDL files. This patch fixes it as shown in JSTestInterface.cpp.
This fix aligns with the fix in CodeGeneratorV8.pm (r123308).
Test: bindings/scripts/test/TestSupplemental.idl
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
(WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
(WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (123438 => 123439)
--- trunk/Source/WebCore/ChangeLog 2012-07-24 08:42:45 UTC (rev 123438)
+++ trunk/Source/WebCore/ChangeLog 2012-07-24 08:44:58 UTC (rev 123439)
@@ -1,3 +1,25 @@
+2012-07-24 Kentaro Hara <hara...@chromium.org>
+
+ [JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code
+ for static attributes in supplemental IDL files
+ https://bugs.webkit.org/show_bug.cgi?id=91925
+
+ Reviewed by Adam Barth.
+
+ r122912 implemented static attributes in CodeGeneratorJS.pm.
+ However, it generates wrong code for static attributes in supplemental
+ IDL files. This patch fixes it as shown in JSTestInterface.cpp.
+ This fix aligns with the fix in CodeGeneratorV8.pm (r123308).
+
+ Test: bindings/scripts/test/TestSupplemental.idl
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateImplementation):
+ * bindings/scripts/test/JS/JSTestInterface.cpp:
+ (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
+ (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
+ (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
+
2012-07-24 Gyuyoung Kim <gyuyoung....@samsung.com>
Add *explicit* keyword to constructor which has a parameter in bridge, history, loader and plugins.
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (123438 => 123439)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2012-07-24 08:42:45 UTC (rev 123438)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2012-07-24 08:44:58 UTC (rev 123439)
@@ -1842,7 +1842,7 @@
my $implementedBy = $attribute->signature->extendedAttributes->{"ImplementedBy"};
$implIncludes{"${implementedBy}.h"} = 1;
$functionName = "${implementedBy}::${functionName}";
- unshift(@arguments, "impl");
+ unshift(@arguments, "impl") if !$attribute->isStatic;
} elsif ($attribute->isStatic) {
$functionName = "${implClassName}::${functionName}";
} else {
@@ -2071,7 +2071,7 @@
if ($attribute->signature->extendedAttributes->{"ImplementedBy"}) {
my $implementedBy = $attribute->signature->extendedAttributes->{"ImplementedBy"};
$implIncludes{"${implementedBy}.h"} = 1;
- unshift(@arguments, "impl");
+ unshift(@arguments, "impl") if !$attribute->isStatic;
$functionName = "${implementedBy}::${functionName}";
} elsif ($attribute->isStatic) {
$functionName = "${implClassName}::${functionName}";
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (123438 => 123439)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp 2012-07-24 08:42:45 UTC (rev 123438)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp 2012-07-24 08:44:58 UTC (rev 123439)
@@ -245,7 +245,7 @@
JSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr(ExecState* exec, JSValue, PropertyName)
{
UNUSED_PARAM(exec);
- JSValue result = jsNumber(TestSupplemental::supplementalStaticReadOnlyAttr(impl));
+ JSValue result = jsNumber(TestSupplemental::supplementalStaticReadOnlyAttr());
return result;
}
@@ -255,7 +255,7 @@
JSValue jsTestInterfaceConstructorSupplementalStaticAttr(ExecState* exec, JSValue, PropertyName)
{
UNUSED_PARAM(exec);
- JSValue result = jsString(exec, TestSupplemental::supplementalStaticAttr(impl));
+ JSValue result = jsString(exec, TestSupplemental::supplementalStaticAttr());
return result;
}
@@ -325,7 +325,7 @@
void setJSTestInterfaceConstructorSupplementalStaticAttr(ExecState* exec, JSObject*, JSValue value)
{
UNUSED_PARAM(exec);
- TestSupplemental::setSupplementalStaticAttr(impl, ustringToString(value.isEmpty() ? UString() : value.toString(exec)->value(exec)));
+ TestSupplemental::setSupplementalStaticAttr(ustringToString(value.isEmpty() ? UString() : value.toString(exec)->value(exec)));
}
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes