Commit 744aedd2 authored by kasperl@chromium.org's avatar kasperl@chromium.org

Fix natives fuzzing: Let the StringIndexOf runtime function

deal with start indexes that are out of range.
Review URL: http://codereview.chromium.org/8762

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7cf09d88
......@@ -1401,6 +1401,7 @@ static Object* Runtime_StringIndexOf(Arguments args) {
uint32_t start_index;
if (!Array::IndexFromObject(index, &start_index)) return Smi::FromInt(-1);
RUNTIME_ASSERT(start_index <= static_cast<uint32_t>(sub->length()));
int position = Runtime::StringMatch(sub, pat, start_index);
return Smi::FromInt(position);
}
......
......@@ -106,6 +106,11 @@ var knownProblems = {
"SetScriptBreakPoint": true,
"ChangeBreakOnException": true,
"PrepareStep": true,
// Calling disable/enable access checks may interfere with the
// the rest of the tests.
"DisableAccessChecks": true,
"EnableAccessChecks": true,
// These functions should not be callable as runtime functions.
"NewContext": true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment