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

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

Issue 18360008: Remove support for [EventTarget] IDL extended attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master 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 | « Source/bindings/scripts/IDLAttributes.txt ('k') | Source/bindings/tests/results/V8Float64Array.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/deprecated_code_generator_v8.pm
diff --git a/Source/bindings/scripts/deprecated_code_generator_v8.pm b/Source/bindings/scripts/deprecated_code_generator_v8.pm
index 3d35fe1359630e113e942db38843c7f89d848bc3..0b3f8a6a0b766fa2e2e503965f3d1d1ccb87726c 100644
--- a/Source/bindings/scripts/deprecated_code_generator_v8.pm
+++ b/Source/bindings/scripts/deprecated_code_generator_v8.pm
@@ -167,9 +167,6 @@ my %nonWrapperTypes = ("CompareHow" => 1,
"DOMTimeStamp" => 1,
"Dictionary" => 1,
"EventListener" => 1,
- # FIXME: When EventTarget is an interface and not a mixin, fix this so that
- # EventTarget is treated as a wrapper type.
- "EventTarget" => 1,
"MediaQueryListListener" => 1,
"NodeFilter" => 1,
"SerializedScriptValue" => 1,
@@ -682,7 +679,7 @@ END
$header{classPublic}->add(" static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>);\n");
}
- if (InheritsExtendedAttribute($interface, "EventTarget")) {
+ if (InheritsInterface($interface, "EventTarget")) {
$header{classPublic}->add(" static EventTarget* toEventTarget(v8::Handle<v8::Object>);\n");
}
@@ -981,7 +978,7 @@ sub GetInternalFields
my @customInternalFields = ();
# Event listeners on DOM nodes are explicitly supported in the GC controller.
if (!InheritsInterface($interface, "Node") &&
- (InheritsExtendedAttribute($interface, "EventTarget") || HasEventListenerAttribute($interface))) {
+ (InheritsInterface($interface, "EventTarget") || HasEventListenerAttribute($interface))) {
push(@customInternalFields, "eventListenerCacheIndex");
}
return @customInternalFields;
@@ -2800,7 +2797,7 @@ sub GenerateNamedConstructor
}
my $toEventTarget = "0";
- if (InheritsExtendedAttribute($interface, "EventTarget")) {
+ if (InheritsInterface($interface, "EventTarget")) {
$toEventTarget = "${v8ClassName}::toEventTarget";
}
@@ -3869,7 +3866,7 @@ sub GenerateImplementation
AddIncludesForType($interfaceName);
my $toActiveDOMObject = InheritsExtendedAttribute($interface, "ActiveDOMObject") ? "${v8ClassName}::toActiveDOMObject" : "0";
- my $toEventTarget = InheritsExtendedAttribute($interface, "EventTarget") ? "${v8ClassName}::toEventTarget" : "0";
+ my $toEventTarget = InheritsInterface($interface, "EventTarget") ? "${v8ClassName}::toEventTarget" : "0";
my $rootForGC = NeedsOpaqueRootForGC($interface) ? "${v8ClassName}::opaqueRootForGC" : "0";
# Find the super descriptor.
@@ -4470,7 +4467,7 @@ ActiveDOMObject* ${v8ClassName}::toActiveDOMObject(v8::Handle<v8::Object> object
END
}
- if (InheritsExtendedAttribute($interface, "EventTarget")) {
+ if (InheritsInterface($interface, "EventTarget")) {
$implementation{nameSpaceWebCore}->add(<<END);
EventTarget* ${v8ClassName}::toEventTarget(v8::Handle<v8::Object> object)
{
@@ -5489,17 +5486,6 @@ sub NativeToJSValue
AddIncludesForType($type);
- if (IsDOMNodeType($type) || $type eq "EventTarget") {
- if ($getScriptWrappable) {
- # FIXME: Use safe handles
- return "${indent}v8SetReturnValue(${getHolderContainer}, toV8Fast${forMainWorldSuffix}($nativeValue$getHolderContainerArg$getScriptWrappableArg));" if $isReturnValue;
- return "$indent$receiver toV8Fast${forMainWorldSuffix}($nativeValue$getHolderContainerArg$getScriptWrappableArg);";
- }
- # FIXME: Use safe handles
- return "${indent}v8SetReturnValue(${getHolderContainer}, toV8($nativeValue, $getCreationContext, $getIsolate));" if $isReturnValue;
- return "$indent$receiver toV8($nativeValue, $getCreationContext, $getIsolate);";
- }
-
if ($type eq "SerializedScriptValue") {
AddToImplIncludes("$type.h");
my $returnValue = "$nativeValue ? $nativeValue->deserialize() : v8::Handle<v8::Value>(v8::Null($getIsolate))";
@@ -5507,7 +5493,6 @@ sub NativeToJSValue
return "$indent$receiver $returnValue;";
}
- AddToImplIncludes("wtf/RefCounted.h");
AddToImplIncludes("wtf/RefPtr.h");
AddToImplIncludes("wtf/GetPtr.h");
« no previous file with comments | « Source/bindings/scripts/IDLAttributes.txt ('k') | Source/bindings/tests/results/V8Float64Array.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698