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
This commit is contained in:
parent
7cf09d8860
commit
744aedd2d0
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user