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

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

Issue 25675003: IDL compiler: remove nop return from end of getters and setters (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 2 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/bindings/templates/attributes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/code_generator_v8.pm
diff --git a/Source/bindings/scripts/code_generator_v8.pm b/Source/bindings/scripts/code_generator_v8.pm
index 9b3874b3b3dbbf77e690c80e33d472c70ea4dbc3..9685aeed69f9d4ba2a639a536ba5737f153d3a4e 100644
--- a/Source/bindings/scripts/code_generator_v8.pm
+++ b/Source/bindings/scripts/code_generator_v8.pm
@@ -1412,7 +1412,6 @@ END
my ($functionName, @arguments) = GetterExpression($interfaceName, $attribute);
$code .= " Element* imp = V8Element::toNative(info.Holder());\n";
$code .= " v8SetReturnValueString(info, imp->${functionName}(" . join(", ", @arguments) . "), info.GetIsolate());\n";
- $code .= " return;\n";
$code .= "}\n\n";
$code .= "#endif // ${conditionalString}\n\n" if $conditionalString;
$implementation{nameSpaceInternal}->add($code);
@@ -1533,7 +1532,6 @@ END
if ($arrayType) {
AddIncludeForType("V8$arrayType.h");
$code .= " v8SetReturnValue(info, v8Array(${getterString}, info.GetIsolate()));\n";
- $code .= " return;\n";
$code .= "}\n\n";
$implementation{nameSpaceInternal}->add($code);
return;
@@ -1557,7 +1555,6 @@ END
$code .= " V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), \"${attrName}\", wrapper);\n";
$code .= " v8SetReturnValue(info, wrapper);\n";
$code .= " }\n";
- $code .= " return;\n";
$code .= "}\n\n";
$code .= "#endif // ${conditionalString}\n\n" if $conditionalString;
$implementation{nameSpaceInternal}->add($code);
@@ -1573,7 +1570,6 @@ END
} else {
$code .= " v8SetReturnValueFast(info, static_cast<$svgNativeType*>($expression), imp);\n";
}
- $code .= " return;\n";
} elsif (IsSVGTypeNeedingTearOff($attrType) and not $interfaceName =~ /List$/) {
AddToImplIncludes("V8$attrType.h");
AddToImplIncludes("core/svg/properties/SVGPropertyTearOff.h");
@@ -1609,7 +1605,6 @@ END
} else {
$code .= " v8SetReturnValueFast(info, $wrappedValue, imp);\n";
}
- $code .= " return;\n";
} elsif ($attrCached) {
if ($attribute->type eq "SerializedScriptValue") {
$code .= " RefPtr<SerializedScriptValue> serialized = $getterString;\n";
@@ -1620,7 +1615,6 @@ END
$code .= <<END;
info.Holder()->SetHiddenValue(propertyName, value);
v8SetReturnValue(info, value);
- return;
END
} elsif ($attribute->type eq "EventHandler") {
AddToImplIncludes("bindings/v8/V8AbstractEventListener.h");
@@ -1628,11 +1622,9 @@ END
# FIXME: Pass the main world ID for main-world-only getters.
$code .= " EventListener* listener = imp->${getterFunc}(isolatedWorldForIsolate(info.GetIsolate()));\n";
$code .= " v8SetReturnValue(info, listener ? v8::Handle<v8::Value>(V8AbstractEventListener::cast(listener)->getListenerObject(imp->scriptExecutionContext())) : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));\n";
- $code .= " return;\n";
} else {
my $nativeValue = NativeToJSValue($attribute->type, $attribute->extendedAttributes, $expression, " ", "", "info.Holder()", "info.GetIsolate()", "info", "imp", $forMainWorldSuffix, "return");
$code .= "${nativeValue}\n";
- $code .= " return;\n";
}
$code .= "}\n\n"; # end of getter
@@ -1970,7 +1962,6 @@ END
END
}
- $code .= " return;\n";
$code .= "}\n\n"; # end of setter
$code .= "#endif // ${conditionalString}\n\n" if $conditionalString;
$implementation{nameSpaceInternal}->add($code);
« no previous file with comments | « no previous file | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698