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

Unified Diff: src/runtime.cc

Issue 23441080: Correct large packed array length limitation (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: make consistent change Created 7 years, 3 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 | « src/elements.cc ('k') | test/mjsunit/allocation-site-info.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 1926eda2776c2bd73182befd9dac4ed553630730..5d22876fbf8dbaabfffe4cea952faea270c827bd 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -14632,11 +14632,11 @@ static MaybeObject* ArrayConstructorCommon(Isolate* isolate,
if (caller_args->length() == 1) {
Object* argument_one = (*caller_args)[0];
if (argument_one->IsSmi()) {
- int value = Smi::cast(argument_one)->value();
- if (value < 0 || value >= JSObject::kInitialMaxFastElementArray) {
+ int len = Smi::cast(argument_one)->value();
+ if (len < 0 || len > JSObject::kInitialMaxFastElementArray) {
// the array is a dictionary in this case.
can_use_type_feedback = false;
- } else if (value != 0) {
+ } else if (len != 0) {
holey = true;
}
} else {
« no previous file with comments | « src/elements.cc ('k') | test/mjsunit/allocation-site-info.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698