Index: test/mjsunit/harmony/proxies-cross-realm-ecxeption.js |
diff --git a/test/mjsunit/harmony/proxies-cross-realm-ecxeption.js b/test/mjsunit/harmony/proxies-cross-realm-ecxeption.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3553638dffcfa0f75d4efac14e30f1d006da0c73 |
--- /dev/null |
+++ b/test/mjsunit/harmony/proxies-cross-realm-ecxeption.js |
@@ -0,0 +1,19 @@ |
+// Copyright 2015 the V8 project authors. All rights reserved. |
dingxiangfei2009
2015/12/12 01:27:01
The file name has a typo
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Flags: --harmony-proxies |
+ |
+// Do not read out the prototype from a cross-realm object. |
+var realm = Realm.create(); |
+ |
+__proto__ = { get foo() { print("+++++++++++++"); } }; |
+Realm.eval(realm, "Reflect.getPrototypeOf(Realm.global(0))"); |
+ |
+// 2-level indirection |
+__proto__ = new Proxy({}, |
+ new Proxy({}, { |
+ get() { assertUnreachable() } |
+ }) |
+); |
+Realm.eval(realm, "Realm.global(0) instanceof Object"); |