Lines Matching refs:Realm
748 var realms = [Realm.create(), Realm.create()];
749 Realm.shared = {};
751 Realm.eval(realms[0], "function f() { return this; };");
752 Realm.eval(realms[0], "Realm.shared.f = f;");
753 Realm.eval(realms[0], "Realm.shared.fg = this;");
754 Realm.eval(realms[1], "function g() { return this; };");
755 Realm.eval(realms[1], "Realm.shared.g = g;");
756 Realm.eval(realms[1], "Realm.shared.gg = this;");
758 var fp = Proxy.createFunction({}, Realm.shared.f);
759 var gp = Proxy.createFunction({}, Realm.shared.g);
762 assertEquals(Realm.shared.fg, fp());
763 assertEquals(Realm.shared.gg, gp());
771 assertEquals(Realm.shared.fg, fp());
772 assertEquals(Realm.shared.gg, gp());