Fix runtime function StringCharAt where an argument was not checked.


Review URL: http://codereview.chromium.org/523126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3321d06c
......@@ -1408,7 +1408,10 @@ static Object* Runtime_StringCharCodeAt(Arguments args) {
static Object* Runtime_StringCharAt(Arguments args) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
return CharFromCode(Runtime_StringCharCodeAt(args));
CONVERT_CHECKED(String, subject, args[0]);
Object* index = args[1];
return CharFromCode(CharCodeAt(subject, index));
}
......
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