Revision: 25185
Author: [email protected]
Date: Thu Nov 6 11:49:34 2014 UTC
Log: Fix for an assertion failure in Map::FindTransitionToField(...).
Appeared after r25136.
BUG=chromium:430846
LOG=N
[email protected]
Review URL: https://codereview.chromium.org/704183002
https://code.google.com/p/v8/source/detail?r=25185
Added:
/branches/bleeding_edge/test/mjsunit/regress/regress-crbug-430846.js
Modified:
/branches/bleeding_edge/src/objects-inl.h
=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/regress/regress-crbug-430846.js
Thu Nov 6 11:49:34 2014 UTC
@@ -0,0 +1,14 @@
+// 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.
+
+// Flags: --allow-natives-syntax
+
+function foo() { return 1; };
+var o1 = {};
+o1.foo = foo;
+
+var json = '{"foo": {"x": 1}}';
+var o2 = JSON.parse(json);
+var o3 = JSON.parse(json);
+assertTrue(%HaveSameMap(o2, o3));
=======================================
--- /branches/bleeding_edge/src/objects-inl.h Wed Nov 5 11:37:02 2014 UTC
+++ /branches/bleeding_edge/src/objects-inl.h Thu Nov 6 11:49:34 2014 UTC
@@ -1886,8 +1886,9 @@
TransitionArray* transitions = map->transitions();
int transition = transitions->Search(FIELD, *key, NONE);
if (transition == TransitionArray::kNotFound) return Handle<Map>::null();
- DCHECK_EQ(FIELD, transitions->GetTargetDetails(transition).type());
- DCHECK_EQ(NONE, transitions->GetTargetDetails(transition).attributes());
+ PropertyDetails details = transitions->GetTargetDetails(transition);
+ if (details.type() != FIELD) return Handle<Map>::null();
+ DCHECK_EQ(NONE, details.attributes());
return Handle<Map>(transitions->GetTarget(transition));
}
--
--
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.