Revision: 24125
Author: [email protected]
Date: Mon Sep 22 15:21:19 2014 UTC
Log: Fix escaped index JSON parsing
BUG=416449
LOG=y
[email protected]
Review URL: https://codereview.chromium.org/592813002
https://code.google.com/p/v8/source/detail?r=24125
Added:
/branches/bleeding_edge/test/mjsunit/regress/regress-json-parse-index.js
Modified:
/branches/bleeding_edge/src/json-parser.h
=======================================
--- /dev/null
+++
/branches/bleeding_edge/test/mjsunit/regress/regress-json-parse-index.js
Mon Sep 22 15:21:19 2014 UTC
@@ -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]);
=======================================
--- /branches/bleeding_edge/src/json-parser.h Wed Sep 10 12:38:12 2014 UTC
+++ /branches/bleeding_edge/src/json-parser.h Mon Sep 22 15:21:19 2014 UTC
@@ -426,8 +426,7 @@
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();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.