Skip to content

Conversation

@domenic
Copy link
Member

@domenic domenic commented Dec 2, 2015

This updates all ES references to point to the latest specification, with links instead of section numbers. It also straightens out some type confusion between Web IDL and ES types.

This relies on tc39/ecma262#226 and so isn't ready to be merged yet, but is ready to be reviewed. There will be a couple broken links into the ES spec.

I accidentally committed this to master, FYI; I reverted it since it definitely needs review, and the ES PR isn't merged yet anyway. Oops.

@domenic domenic added the do not merge yet Pull request must not be merged per rationale in comment label Dec 2, 2015
@domenic domenic force-pushed the es-idl branch 3 times, most recently from 61ef881 to 8c583b3 Compare December 8, 2015 19:51
@domenic
Copy link
Member Author

domenic commented Dec 8, 2015

I have pushed two more commits to this branch, which bring us up to date with ES's initialization scheme. I have not yet done script execution, although that is next.

@domenic domenic removed the do not merge yet Pull request must not be merged per rationale in comment label Dec 8, 2015
Copy link
Member

Choose a reason for hiding this comment

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

Does not remove precision? Note that XMLHttpRequest and maybe other specifications use similar language to distinguish the global environments. Perhaps "in a window" and "in a worker" need to become defined terms?

Copy link
Member Author

Choose a reason for hiding this comment

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

Did you see the commit message? "The "JavaScript global environment" concept was hackily removed." etc. etc.

Copy link
Member

Choose a reason for hiding this comment

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

I did not, but the justification does not account for usage in other standards, which I brought up in my comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think what these APIs are doing is quite bad, as noted in the linked bugs. It'd be better if other APIs used incumbent or entry settings object.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, file a bug against https://xhr.spec.whatwg.org/ then? Not sure if this is used elsewhere. @mikewest is using the JavaScript global environment concept maybe?

@domenic
Copy link
Member Author

domenic commented Dec 14, 2015

Comments addressed; filing bug on XHR to get rid of JavaScript global environment there too.

This updates all ES references to point to the latest specification, with links instead of section numbers. It also straightens out some type confusion between Web IDL and ES types.
This reorganizes the section on browsing context creation so that creating a browsing context is now spelled out as a series of steps, and is more explicit about the association and creation of Window, Document, and WindowProxy objects.

This is part of the plan noted in https://www.w3.org/Bugs/Public/show_bug.cgi?id=25981 for integration with the new ECMAScript initialization lifecycle.
Points of note:

- ECMAScript now has the appropriate hooks (as of tc39/ecma262#226) for a separate global this value and global object, allowing us to fix a long-standing willful violation.

- Worker initialization was refactored extensively, to avoid creating WorkerGlobalScope objects before the corresponding realm was created. (The existing setup had the problem where it was creating a WorkerGlobalScope, derived from Object, in a thread that didn't even exist yet.)

- The "JavaScript global environment" concept was hackily removed. As discussed in #380 and #382, the only uses of "JavaScript global environment" are for a couple of canvas-related concepts which need to be removed anyway. And the definition we were using did not line up very well with ES's. We temporarily replace them with vague phrasing "lives in a window" and "lives in a worker"; this is OK since those sections will be deleted soon. This fixes #380 and fixes #382.

This is roughly steps 3, 4, and 6 of https://www.w3.org/Bugs/Public/show_bug.cgi?id=25981. It contains all the changes necessary to integrate with ES's new initialization mechanisms for a given host-defined realm, without yet any of the changes for script execution. This also fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=27419.
@domenic domenic merged commit cf0355d into master Dec 15, 2015
@domenic domenic deleted the es-idl branch December 15, 2015 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants