Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update to newer spec #300

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ExE-Boss
Copy link
Contributor

@ExE-Boss ExE-Boss commented Sep 27, 2020

Part of #181

Features

  • Added support for new Realm() and subclassing.
  • Added Realm.prototype.globalThis.
  • Changed Realm.makeRootRealm() to call new Realm().

Deprecations

  • Realm.makeRootRealm()
    • Replaced with new Realm().
  • Realm.makeCompartment()
  • get Realm.prototype.global
    • Converted to an alias of Realm.prototype.globalThis:

       assert(
       	Object.is(
       		Realm.prototype.__lookupGetter__('global'),
       		Realm.prototype.__lookupGetter__('globalThis'),
       	),
       );

To do (in future PRs):

  • Implement Realm.prototype.import(…).

@ExE-Boss ExE-Boss force-pushed the feat/update-to-newer-spec branch from 48f9129 to 85d7598 Compare September 27, 2020 15:39
@Jack-Works
Copy link
Contributor

Cool! Will there be a Compartment polyfill?

@ExE-Boss
Copy link
Contributor Author

Will there be a Compartment polyfill?

That depends on the Compartments Proposal having an actual specification text, instead of just having an explainer.

@@ -12,41 +12,35 @@ export function buildChildRealm(unsafeRec, BaseRealm) {
realmEvaluate
} = BaseRealm;

const { create, defineProperties } = Object;
const { create, defineProperties, getOwnPropertyDescriptor } = Object;

class Realm {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants