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

Unified Diff: src/elements.cc

Issue 2756663002: [csa] Bailout to the runtime for ToInteger conversion in Array.p.indexOf. (Closed)
Patch Set: Also fix FastDoubleElementsAccessor::IndexOfValueImpl Created 3 years, 9 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/builtins/builtins-array.cc ('k') | test/mjsunit/regress/regress-crbug-702058-1.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index 7a12f6606516f78d8ae0a7bffbd54654b0cd84c7..e2dd976f62cfb3212a1028a7348cc27acb64543a 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -2638,10 +2638,10 @@ class FastDoubleElementsAccessor
FixedArrayBase* elements_base = receiver->elements();
Object* value = *search_value;
- if (start_from >= length) return Just<int64_t>(-1);
-
length = std::min(static_cast<uint32_t>(elements_base->length()), length);
+ if (start_from >= length) return Just<int64_t>(-1);
+
if (!value->IsNumber()) {
return Just<int64_t>(-1);
}
« no previous file with comments | « src/builtins/builtins-array.cc ('k') | test/mjsunit/regress/regress-crbug-702058-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698