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

Unified Diff: src/runtime.js

Issue 790813005: Map -0 to integer 0 for typed array constructors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | test/mjsunit/regress/regress-447756.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.js
diff --git a/src/runtime.js b/src/runtime.js
index 79824e4e02a4b950e191e9a2afbaa60b2818e3f2..978429ea3bb701be51c4115b3213c89bd5867566 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -672,7 +672,7 @@ function DefaultString(x) {
}
function ToPositiveInteger(x, rangeErrorName) {
- var i = TO_INTEGER(x);
+ var i = TO_INTEGER_MAP_MINUS_ZERO(x);
if (i < 0) throw MakeRangeError(rangeErrorName);
return i;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-447756.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698