Fix escaped index JSON parsing
BUG=416449 LOG=y R=yangguo@chromium.org Review URL: https://codereview.chromium.org/592813002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
269c46ee80
commit
83f64e8c1f
@ -426,8 +426,7 @@ Handle<Object> JsonParser<seq_one_byte>::ParseJsonObject() {
|
||||
if (value.is_null()) return ReportUnexpectedCharacter();
|
||||
}
|
||||
|
||||
JSObject::SetOwnPropertyIgnoreAttributes(
|
||||
json_object, key, value, NONE).Assert();
|
||||
Runtime::DefineObjectProperty(json_object, key, value, NONE).Check();
|
||||
} while (MatchSkipWhiteSpace(','));
|
||||
if (c0_ != '}') {
|
||||
return ReportUnexpectedCharacter();
|
||||
|
6
test/mjsunit/regress/regress-json-parse-index.js
Normal file
6
test/mjsunit/regress/regress-json-parse-index.js
Normal file
@ -0,0 +1,6 @@
|
||||
// Copyright 2014 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
var o = JSON.parse('{"\\u0030":100}');
|
||||
assertEquals(100, o[0]);
|
Loading…
Reference in New Issue
Block a user