Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 6d1c6a978599a96720b6e259469681ddf3c70f7e..5d4b2b410190ba375e7db8ae394d8f3b5b55394c 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -413,13 +413,13 @@ static inline MaybeObject* EnsureJSArrayWithWritableFastElements( |
Map* map = elms->map(); |
if (map == heap->fixed_array_map()) { |
if (array->HasFastElements()) return elms; |
+ if (array->HasFastDoubleElements()) { |
+ ASSERT(elms == heap->empty_fixed_array()); |
+ MaybeObject* maybe_transition = |
+ array->TransitionElementsKind(FAST_ELEMENTS); |
+ if (maybe_transition->IsFailure()) return maybe_transition; |
Michael Starzinger
2012/05/15 15:38:13
At this point we know that the array has FAST_ELEM
|
+ } |
if (args == NULL) { |
Michael Starzinger
2012/05/15 15:38:13
Can we merge that into line 415 like the following
|
- if (array->HasFastDoubleElements()) { |
- ASSERT(elms == heap->empty_fixed_array()); |
- MaybeObject* maybe_transition = |
- array->TransitionElementsKind(FAST_ELEMENTS); |
- if (maybe_transition->IsFailure()) return maybe_transition; |
- } |
return elms; |
} |
} else if (map == heap->fixed_cow_array_map()) { |