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

Unified Diff: src/typedarray.js

Issue 1237583005: Only evaluate length once in %TypedArray%.prototype.set (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add more cases to the test Created 5 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 | « no previous file | test/mjsunit/es6/typedarray-set-length.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typedarray.js
diff --git a/src/typedarray.js b/src/typedarray.js
index ce52cdf15c0b50db12eb9c904fd1781ce30acf26..8e18b5e66e08755ec7f9389530eef640100b4119 100644
--- a/src/typedarray.js
+++ b/src/typedarray.js
@@ -330,6 +330,7 @@ function TypedArraySet(obj, offset) {
}
return;
}
+ l = $toLength(l);
if (intOffset + l > this.length) {
throw MakeRangeError(kTypedArraySetSourceTooLarge);
}
« no previous file with comments | « no previous file | test/mjsunit/es6/typedarray-set-length.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698