Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 463a15f6c3b4d650a433f77d988e72539a60aaae..cd84380bdeda8a24f60d7617208fee103b09c26f 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -301,6 +301,11 @@ static inline MaybeHandle<FixedArrayBase> EnsureJSArrayWithWritableFastElements( |
int first_added_arg) { |
if (!receiver->IsJSArray()) return MaybeHandle<FixedArrayBase>(); |
Handle<JSArray> array = Handle<JSArray>::cast(receiver); |
+ // If there may be elements accessors in the prototype chain, the fast path |
+ // cannot be used. |
+ if (array->map()->DictionaryElementsInPrototypeChainOnly()) { |
+ return MaybeHandle<FixedArrayBase>(); |
+ } |
if (array->map()->is_observed()) return MaybeHandle<FixedArrayBase>(); |
if (!array->map()->is_extensible()) return MaybeHandle<FixedArrayBase>(); |
Handle<FixedArrayBase> elms(array->elements(), isolate); |