Index: test/test262/harness-adapt.js |
diff --git a/test/test262/harness-adapt.js b/test/test262/harness-adapt.js |
index d93d7e16109713090d92c011e8c31f5e7031770e..35d6f63ac63f5d65798d62494013f3a1aa6e134e 100644 |
--- a/test/test262/harness-adapt.js |
+++ b/test/test262/harness-adapt.js |
@@ -90,6 +90,18 @@ function $DONE(arg){ |
quit(0); |
}; |
-var $ = { |
- evalScript(script) { return Realm.eval(Realm.current(), script); } |
-}; |
+function RealmOperators(realm) { |
+ let $ = { |
+ evalScript(script) { |
+ return Realm.eval(realm, script); |
+ }, |
+ createRealm() { |
+ return RealmOperators(Realm.createAllowCrossRealmAccess()); |
+ }, |
+ global: Realm.eval(realm, 'this') |
+ }; |
+ $.global.$ = $; |
+ return $; |
+} |
+ |
+var $ = RealmOperators(Realm.current()); |