Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: test/mjsunit/es6/proxies-accesschecks.js

Issue 2034083002: Don't compile functions in a context the caller doesn't have access to (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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: --restricted-realms
6
5 var realm = Realm.create(); 7 var realm = Realm.create();
6 8
7 this.__proto__ = new Proxy({}, { 9 this.__proto__ = new Proxy({}, {
8 getPrototypeOf() { assertUnreachable() }, 10 getPrototypeOf() { assertUnreachable() },
9 get() { assertUnreachable() } 11 get() { assertUnreachable() }
10 }); 12 });
11 13
12 var other_type_error = Realm.eval(realm, "TypeError"); 14 var other_type_error = Realm.eval(realm, "TypeError");
13 assertThrows(() => Realm.eval(realm, "Realm.global(0).foo"), other_type_error); 15 assertThrows(() => Realm.eval(realm, "Realm.global(0).foo"), other_type_error);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698