Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: Source/bindings/scripts/CodeGeneratorV8.pm

Issue 18897002: Generate eventListenerCacheIndex if an EventListener is present (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/page/Performance.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/CodeGeneratorV8.pm
diff --git a/Source/bindings/scripts/CodeGeneratorV8.pm b/Source/bindings/scripts/CodeGeneratorV8.pm
index eb243b6762c798c918f7e64ba1d847c8443dce84..a7c64245896e60ce3065aa08dd066b699be13ee9 100644
--- a/Source/bindings/scripts/CodeGeneratorV8.pm
+++ b/Source/bindings/scripts/CodeGeneratorV8.pm
@@ -941,6 +941,17 @@ END
}
}
+sub HasEventListenerAttribute
+{
+ my $interface = shift;
+
+ foreach my $attribute (@{$interface->attributes}) {
+ return 1 if $attribute->type eq "EventListener";
+ }
+
+ return 0;
+}
+
sub GetInternalFields
{
my $interface = shift;
@@ -948,7 +959,7 @@ sub GetInternalFields
my @customInternalFields = ();
# Event listeners on DOM nodes are explicitly supported in the GC controller.
if (!InheritsInterface($interface, "Node") &&
- InheritsExtendedAttribute($interface, "EventTarget")) {
+ (InheritsExtendedAttribute($interface, "EventTarget") || HasEventListenerAttribute($interface))) {
push(@customInternalFields, "eventListenerCacheIndex");
}
return @customInternalFields;
« no previous file with comments | « no previous file | Source/core/page/Performance.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698