| Index: src/builtins.cc
|
| diff --git a/src/builtins.cc b/src/builtins.cc
|
| index 1c596503ef86e95bf3b6e3054ade3c484ae4a661..c4d99b508cf39103d306236031d04313ea081381 100644
|
| --- a/src/builtins.cc
|
| +++ b/src/builtins.cc
|
| @@ -251,6 +251,9 @@ MUST_USE_RESULT
|
| inline MaybeHandle<FixedArrayBase> EnsureJSArrayWithWritableFastElements(
|
| Isolate* isolate, Handle<Object> receiver, Arguments* args,
|
| int first_added_arg) {
|
| + // We explicitly add a HandleScope to avoid creating several copies of the
|
| + // same handle which would otherwise cause issue when left-trimming later-on.
|
| + HandleScope scope(isolate);
|
| 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
|
|
|