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

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

Issue 22962003: Remove support for [IsIndex] IDL extended attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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/idls/TestEventTarget.idl » ('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 c327e69218601d12d2b9af4af6bb0e4cd0dca716..39c5394140ffc04c01f1f7f6d0ec96de5d4d8f51 100644
--- a/Source/bindings/scripts/deprecated_code_generator_v8.pm
+++ b/Source/bindings/scripts/deprecated_code_generator_v8.pm
@@ -2191,14 +2191,6 @@ END
}
my $raisesExceptions = $function->extendedAttributes->{"RaisesException"};
- if (!$raisesExceptions) {
- foreach my $parameter (@{$function->parameters}) {
- if ($parameter->extendedAttributes->{"IsIndex"}) {
- $raisesExceptions = 1;
- }
- }
- }
-
if ($raisesExceptions) {
AddToImplIncludes("bindings/v8/ExceptionState.h");
$code .= " ExceptionState es(args.GetIsolate());\n";
@@ -2417,14 +2409,6 @@ sub GenerateParametersCheck
}
}
- if ($parameter->extendedAttributes->{"IsIndex"}) {
- AddToImplIncludes("core/dom/ExceptionCode.h");
- $parameterCheckString .= " if (UNLIKELY($parameterName < 0)) {\n";
- $parameterCheckString .= " setDOMException(IndexSizeError, args.GetIsolate());\n";
- $parameterCheckString .= " return;\n";
- $parameterCheckString .= " }\n";
- }
-
$paramIndex++;
}
return ($parameterCheckString, $paramIndex, %replacements);
@@ -2480,13 +2464,6 @@ sub GenerateSingleConstructorCallback
if ($interface->extendedAttributes->{"ConstructorRaisesException"}) {
$raisesExceptions = 1;
}
- if (!$raisesExceptions) {
- foreach my $parameter (@{$function->parameters}) {
- if ($parameter->extendedAttributes->{"IsIndex"}) {
- $raisesExceptions = 1;
- }
- }
- }
my @beforeArgumentList;
my @afterArgumentList;
@@ -2746,13 +2723,6 @@ sub GenerateNamedConstructor
if ($interface->extendedAttributes->{"ConstructorRaisesException"}) {
$raisesExceptions = 1;
}
- if (!$raisesExceptions) {
- foreach my $parameter (@{$function->parameters}) {
- if ($parameter->extendedAttributes->{"IsIndex"}) {
- $raisesExceptions = 1;
- }
- }
- }
my $maybeObserveFeature = GenerateFeatureObservation($function->extendedAttributes->{"MeasureAs"});
my $maybeDeprecateFeature = GenerateDeprecationNotification($function->extendedAttributes->{"DeprecateAs"});
@@ -4982,10 +4952,6 @@ sub GetNativeType
return "double" if $type eq "double";
return "int" if $type eq "long" or $type eq "int" or $type eq "short" or $type eq "byte";
if ($type eq "unsigned long" or $type eq "unsigned int" or $type eq "unsigned short" or $type eq "octet") {
- if ($extendedAttributes->{"IsIndex"}) {
- # Special-case index arguments because we need to check that they aren't < 0.
- return "int";
- }
return "unsigned";
}
return "long long" if $type eq "long long";
@@ -5065,10 +5031,6 @@ sub JSValueToNativeStatement
my $getIsolate = shift;
my $nativeType = GetNativeType($type, $extendedAttributes, "parameter");
- if ($type eq "unsigned long" and $extendedAttributes->{"IsIndex"}) {
- # Special-case index arguments because we need to check that they aren't < 0.
- $nativeType = "int";
- }
my $native_value = JSValueToNative($type, $extendedAttributes, $jsValue, $getIsolate);
my $code = "";
if ($type eq "DOMString" || IsEnumType($type)) {
« no previous file with comments | « Source/bindings/scripts/IDLAttributes.txt ('k') | Source/bindings/tests/idls/TestEventTarget.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698