Index: src/json-parser.h |
diff --git a/src/json-parser.h b/src/json-parser.h |
index 09320ab2bddfe3ae1ff84e35ce776ca00ea1f8fb..cdbb50d6e88c3281b6a7fd83b1935f3c828cfe26 100644 |
--- a/src/json-parser.h |
+++ b/src/json-parser.h |
@@ -387,11 +387,9 @@ Handle<Object> JsonParser<seq_ascii>::ParseJsonObject() { |
Representation expected_representation = details.representation(); |
if (value->FitsRepresentation(expected_representation)) { |
- // If the target representation is double and the value is already |
- // double, use the existing box. |
- if (value->IsSmi() && expected_representation.IsDouble()) { |
- value = factory()->NewHeapNumber( |
- Handle<Smi>::cast(value)->value()); |
+ if (expected_representation.IsDouble()) { |
+ value = Object::NewStorageFor(isolate(), value, |
+ expected_representation); |
} else if (expected_representation.IsHeapObject() && |
!target->instance_descriptors()->GetFieldType( |
descriptor)->NowContains(value)) { |