blob: 5cb7cb6ce2d57a4df35d57a619dbf7ee8ee75cbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-additional-properties-of-the-object.prototype-object
description: Behavior when "this" value is not extensible
info: |
[...]
5. Perform ? DefinePropertyOrThrow(O, key, desc).
features: [__getter__]
---*/
var noop = function() {};
var subject = Object.preventExtensions({ existing: null });
subject.__defineGetter__('existing', noop);
assert.throws(TypeError, function() {
subject.__defineGetter__('brand new', noop);
});
reportCompare(0, 0);
|