OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --harmony-proxies | |
6 | |
7 var realm = Realm.create(); | 5 var realm = Realm.create(); |
8 | 6 |
9 this.__proto__ = new Proxy({}, { | 7 this.__proto__ = new Proxy({}, { |
10 getPrototypeOf() { assertUnreachable() }, | 8 getPrototypeOf() { assertUnreachable() }, |
11 get() { assertUnreachable() } | 9 get() { assertUnreachable() } |
12 }); | 10 }); |
13 | 11 |
14 var other_type_error = Realm.eval(realm, "TypeError"); | 12 var other_type_error = Realm.eval(realm, "TypeError"); |
15 assertThrows(() => Realm.eval(realm, "Realm.global(0).foo"), other_type_error); | 13 assertThrows(() => Realm.eval(realm, "Realm.global(0).foo"), other_type_error); |
OLD | NEW |