WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
jsc-generate-visit-children.patch (text/plain), 4.46 KB, created by
Michael Pruett
on 2012-12-03 16:02:21 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Michael Pruett
Created:
2012-12-03 16:02:21 PST
Size:
4.46 KB
patch
obsolete
>From: Michael Pruett <michael@68k.org> >Date: Mon, 3 Dec 2012 15:56:05 -0800 >Subject: [JSC] Generate visitChildren() for uncustomized EventTarget interfaces > >--- > Source/WebCore/ChangeLog | 18 ++++++++++ > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm | 36 +++++++++----------- > 2 files changed, 35 insertions(+), 19 deletions(-) > >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c26d3ad..b047bc9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2012-12-03 Michael Pruett <michael@68k.org> >+ >+ [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-03 Sheriff Bot <webkit.review.bot@gmail.com> > > Unreviewed, rolling out r135271. >diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >index 5b4d7ac..1241c66 100644 >--- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >@@ -2355,28 +2355,26 @@ sub GenerateImplementation > } > } > >- 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. >-- >1.7.9.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 103908
:
177288
|
177300
|
177314
| 177361