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; |