f79caee25f
- Rename Runtime_SetProperty to Runtime_SetKeyedProperty - Create Runtime_SetNamedProperty and use it for SetNamed property in one-shot code. - Rename Object::StoreFromKeyed enum to StoreOrigin Bug: v8:8072, chromium:876839 Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: I22132380ca4b6ce1e0a14a38cca849814559cdcf Reviewed-on: https://chromium-review.googlesource.com/1207870 Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Chandan Reddy <chandanreddy@google.com> Cr-Commit-Position: refs/heads/master@{#55790}
20 lines
439 B
JavaScript
20 lines
439 B
JavaScript
// Copyright 2014 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 --enable-slow-asserts
|
|
|
|
var arr = [];
|
|
var str = new String('x');
|
|
|
|
function f(a,b) {
|
|
a[b] = 1;
|
|
}
|
|
|
|
f(arr, 0);
|
|
f(str, 0);
|
|
f(str, 0);
|
|
|
|
// This is just to trigger elements validation, object already broken.
|
|
%SetKeyedProperty(str, 1, 'y', 0);
|