17875b01ca
Bug: chromium:842101 R=neis@chromium.org Change-Id: I4a142b28682ba73cbf3398e74c15614fa491ad40 Reviewed-on: https://chromium-review.googlesource.com/1057627 Commit-Queue: Maya Lekova <mslekova@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#53164}
19 lines
629 B
JavaScript
19 lines
629 B
JavaScript
// Copyright 2018 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.
|
|
|
|
function set_value(obj, prop) { return obj[prop] = undefined }
|
|
|
|
var object1 = new Proxy({}, {set: true});
|
|
try { set_value(object1, "bla"); } catch (_) {};
|
|
try { set_value(object1, "0"); } catch (_) {};
|
|
try { set_value(object1, Symbol()); } catch(_) {};
|
|
|
|
set_value({}, 1073741824)
|
|
|
|
var target = {};
|
|
var handler = { set() { return 42 } };
|
|
var object2 = new Proxy(target, handler);
|
|
Object.defineProperty(target, 'bla', { value: 0 });
|
|
set_value(object2, 'bla', 0);
|