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

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

Issue 54903014: [EnforceRange] doesn't enforce range of a short (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Extend layout test Created 7 years, 1 month 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 | « LayoutTests/fast/js/webidl-type-mapping-expected.txt ('k') | Source/bindings/scripts/unstable/v8_types.py » ('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 ebd95b52d63eb9fe2a3174f8da3dd85d1be7086d..a2e9487f5c9fc10204b80042bf0c68c432284beb 100644
--- a/Source/bindings/scripts/code_generator_v8.pm
+++ b/Source/bindings/scripts/code_generator_v8.pm
@@ -5369,15 +5369,19 @@ sub JSValueToNative
if ($intConversion ne "NormalConversion") {
return "toInt8($value, $intConversion, ok)" if $type eq "byte";
return "toUInt8($value, $intConversion, ok)" if $type eq "octet";
- return "toInt32($value, $intConversion, ok)" if $type eq "long" or $type eq "short";
eseidel 2013/11/04 07:14:13 I see. We just were mistakenly treating it 32bit.
- return "toUInt32($value, $intConversion, ok)" if $type eq "unsigned long" or $type eq "unsigned short";
+ return "toInt16($value, $intConversion, ok)" if $type eq "short";
+ return "toUInt16($value, $intConversion, ok)" if $type eq "unsigned short";
+ return "toInt32($value, $intConversion, ok)" if $type eq "long";
+ return "toUInt32($value, $intConversion, ok)" if $type eq "unsigned long";
return "toInt64($value, $intConversion, ok)" if $type eq "long long";
return "toUInt64($value, $intConversion, ok)" if $type eq "unsigned long long";
} else {
return "toInt8($value)" if $type eq "byte";
return "toUInt8($value)" if $type eq "octet";
- return "toInt32($value)" if $type eq "long" or $type eq "short";
- return "toUInt32($value)" if $type eq "unsigned long" or $type eq "unsigned short";
+ return "toInt16($value)" if $type eq "short";
+ return "toUInt16($value)" if $type eq "unsigned short";
+ return "toInt32($value)" if $type eq "long";
+ return "toUInt32($value)" if $type eq "unsigned long";
return "toInt64($value)" if $type eq "long long";
return "toUInt64($value)" if $type eq "unsigned long long";
}
« no previous file with comments | « LayoutTests/fast/js/webidl-type-mapping-expected.txt ('k') | Source/bindings/scripts/unstable/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698