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

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

Issue 23068032: Add constants and primitive type readonly attributes to Python IDL compiler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Re-reupload 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/code_generator_v8.py ('k') | 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/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 94e8d565aada16440defda6056c92815ee6a3687..01362dbfd6ab7d40e2aa22b8572420052cd287a2 100644
--- a/Source/bindings/scripts/deprecated_code_generator_v8.pm
+++ b/Source/bindings/scripts/deprecated_code_generator_v8.pm
@@ -4153,7 +4153,7 @@ END
$code .= <<END;
{"${name}", $value},
END
- $code .= "#endif\n" if $conditionalString;
+ $code .= "#endif // $conditionalString\n" if $conditionalString;
}
}
if ($has_constants) {
@@ -4241,7 +4241,7 @@ END
AddToImplIncludes("wtf/UnusedParam.h");
$code .= <<END;
- UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
+ UNUSED_PARAM(defaultSignature);
END
if (IsConstructable($interface)) {
@@ -4254,8 +4254,8 @@ END
$code .= <<END;
v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
- UNUSED_PARAM(instance); // In some cases, it will not be used.
- UNUSED_PARAM(proto); // In some cases, it will not be used.
+ UNUSED_PARAM(instance);
+ UNUSED_PARAM(proto);
END
}
@@ -4295,6 +4295,12 @@ END
$code .= "\n#endif // ${conditionalString}\n" if $conditionalString;
}
+ if ($has_constants) {
+ $code .= <<END;
+ V8DOMConfiguration::installConstants(desc, proto, ${v8ClassName}Constants, WTF_ARRAY_LENGTH(${v8ClassName}Constants), isolate);
+END
+ }
+
$code .= GenerateImplementationIndexedPropertyAccessors($interface);
$code .= GenerateImplementationNamedPropertyAccessors($interface);
$code .= GenerateImplementationLegacyCall($interface);
@@ -4315,12 +4321,6 @@ END
die "Wrong number of callbacks generated for $interfaceName ($num_callbacks, should be $total_functions)" if $num_callbacks != $total_functions;
- if ($has_constants) {
- $code .= <<END;
- V8DOMConfiguration::installConstants(desc, proto, ${v8ClassName}Constants, WTF_ARRAY_LENGTH(${v8ClassName}Constants), isolate);
-END
- }
-
# Special cases
if ($interfaceName eq "Window") {
$code .= <<END;
@@ -4429,7 +4429,7 @@ END
# Setup the enable-by-settings functions if we have them
$code .= <<END;
v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate(isolate, worldType(isolate)));
- UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
+ UNUSED_PARAM(defaultSignature);
ScriptExecutionContext* context = toScriptExecutionContext(proto->CreationContext());
END
@@ -5981,7 +5981,7 @@ sub GenerateCompileTimeCheckForEnumsIfNeeded
push(@checks, "COMPILE_ASSERT($value == ${implClassName}::$name, ${implClassName}Enum${name}IsWrongUseDoNotCheckConstants);\n");
}
- push(@checks, "#endif\n") if $conditionalString;
+ push(@checks, "#endif // $conditionalString\n") if $conditionalString;
}
push(@checks, "\n");
}
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.py ('k') | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698