Modified: trunk/Source/WebCore/ChangeLog (136481 => 136482)
--- trunk/Source/WebCore/ChangeLog 2012-12-04 08:04:26 UTC (rev 136481)
+++ trunk/Source/WebCore/ChangeLog 2012-12-04 08:06:30 UTC (rev 136482)
@@ -1,3 +1,21 @@
+2012-12-04 Michael Pruett <[email protected]>
+
+ [JSC] Generate visitChildren() for uncustomized EventTarget interfaces
+ https://bugs.webkit.org/show_bug.cgi?id=103908
+
+ Reviewed by Geoffrey Garen.
+
+ CodeGeneratorJS.pm should automatically generate visitChildren()
+ for EventTarget interfaces without custom mark functions even if
+ those interfaces have no functions or cached attributes.
+
+ This change is needed for IDBOpenDBRequest and IDBVersionChangeRequest.
+
+ No new tests. Covered by existing tests.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateImplementation):
+
2012-12-04 Kentaro Hara <[email protected]>
Change ChildNodeInsertionNotifier::m_postInsertionsNotificationTargets from a Vector to an OwnPtr
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (136481 => 136482)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2012-12-04 08:04:26 UTC (rev 136481)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2012-12-04 08:06:30 UTC (rev 136482)
@@ -2355,28 +2355,26 @@
}
}
- if ($numFunctions > 0 || $numCachedAttributes > 0) {
- if ($needsMarkChildren && !$interface->extendedAttributes->{"JSCustomMarkFunction"}) {
- push(@implContent, "void ${className}::visitChildren(JSCell* cell, SlotVisitor& visitor)\n");
- push(@implContent, "{\n");
- push(@implContent, " ${className}* thisObject = jsCast<${className}*>(cell);\n");
- push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);\n");
- push(@implContent, " COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);\n");
- push(@implContent, " ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());\n");
- push(@implContent, " Base::visitChildren(thisObject, visitor);\n");
- if ($interface->extendedAttributes->{"EventTarget"} || $interface->name eq "EventTarget") {
- push(@implContent, " thisObject->impl()->visitJSEventListeners(visitor);\n");
- }
- if ($numCachedAttributes > 0) {
- foreach (@{$interface->attributes}) {
- my $attribute = $_;
- if ($attribute->signature->extendedAttributes->{"CachedAttribute"}) {
- push(@implContent, " visitor.append(&thisObject->m_" . $attribute->signature->name . ");\n");
- }
+ if ($needsMarkChildren && !$interface->extendedAttributes->{"JSCustomMarkFunction"}) {
+ push(@implContent, "void ${className}::visitChildren(JSCell* cell, SlotVisitor& visitor)\n");
+ push(@implContent, "{\n");
+ push(@implContent, " ${className}* thisObject = jsCast<${className}*>(cell);\n");
+ push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);\n");
+ push(@implContent, " COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);\n");
+ push(@implContent, " ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());\n");
+ push(@implContent, " Base::visitChildren(thisObject, visitor);\n");
+ if ($interface->extendedAttributes->{"EventTarget"} || $interface->name eq "EventTarget") {
+ push(@implContent, " thisObject->impl()->visitJSEventListeners(visitor);\n");
+ }
+ if ($numCachedAttributes > 0) {
+ foreach (@{$interface->attributes}) {
+ my $attribute = $_;
+ if ($attribute->signature->extendedAttributes->{"CachedAttribute"}) {
+ push(@implContent, " visitor.append(&thisObject->m_" . $attribute->signature->name . ");\n");
}
}
- push(@implContent, "}\n\n");
}
+ push(@implContent, "}\n\n");
}
# Cached attributes are indeed allowed when there is a custom mark/visitChildren function.