Commit cecbe26b authored by Daniel Clifford's avatar Daniel Clifford Committed by Commit Bot

Fix index bug in splicing dictionary element arrays

Bug: chromium:783119
Change-Id: I617db4f6740fb2cfe036ccf162a12aa2bac28e86
Reviewed-on: https://chromium-review.googlesource.com/763460Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49320}
parent 2662b214
...@@ -1452,8 +1452,8 @@ class DictionaryElementsAccessor ...@@ -1452,8 +1452,8 @@ class DictionaryElementsAccessor
Handle<Object> value(source_dict->ValueAt(i), isolate); Handle<Object> value(source_dict->ValueAt(i), isolate);
PropertyDetails details = source_dict->DetailsAt(i); PropertyDetails details = source_dict->DetailsAt(i);
PropertyAttributes attr = details.attributes(); PropertyAttributes attr = details.attributes();
AddImpl(result_array, static_cast<uint32_t>(key_value), value, attr, AddImpl(result_array, static_cast<uint32_t>(key_value) - start, value,
0); attr, 0);
} }
} }
} }
......
// Copyright 2017 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
let a = [,,,,,,,,,,,,,,,,,,,,,,,11,12,13,14,15,16,17,18,19];
%NormalizeElements(a);
let b = a.slice(19);
assertEquals(11, b[4]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment