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:
verwaest@chromium.org 2014-09-22 15:21:19 +00:00
parent 269c46ee80
commit 83f64e8c1f
2 changed files with 7 additions and 2 deletions

View File

@ -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();

View 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]);