-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Create async iterators and iterator result objects in the correct realm #247
Merged
Merged
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
1748942
Capture (wrong realm's) AsyncIterator prototype
ninevra 07a8b85
Use the captured async iterator prototype
ninevra 2df034f
Add registerConstructor utility
ninevra 6497682
Update snapshots
ninevra 57d54e6
Create iterator results in the relevant realm
ninevra 58a1509
Update snapshots
ninevra 4e716a4
Store Object in the ctorRegistry
ninevra 3ee1af8
Test registerConstructor()
ninevra 79bedc3
Test newObjectInRealm()
ninevra e553d7f
Try to document registerConstructor()
ninevra 9552606
Rename registerConstructor to registerIntrinsic
ninevra 229b06d
Add an explanatory comment
ninevra 9aa0049
Use eval() to create an async generator function
ninevra 268fc9d
Capture Object.prototype directly
ninevra 682cc7d
Use fallback AsyncIteratorPrototype if eval fails
ninevra c56aeae
Remove unused error variable
ninevra 50c7379
Remove eval from tests
ninevra 02dcb67
Remove blank line
ninevra 3091543
Comment unused exports
ninevra c60840f
Remove exports since we're bumping the major version anyway
domenic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These exports could be removed now; should they be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think removing them would technically be a major bump. Maybe add a comment here saying we should remove them when we bump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. It's worth noting though that there's already a bit of incompatibility between the main branch and the last release; interfaces generated after #234 expect
initCtorRegistry
to be the only way of initializing thectorRegistry
, while code generated before #234 naturally doesn't callinitCtorRegistry
, as it didn't exist. Installing pre-#234 interfaces before post-#234 interfaces causes the latter to throw, because thectorRegistry
was created but%IteratorPrototype%
was not captured. There's a workaround (callinginitCtorRegistry
manually before installing interfaces), which I've been using in local testing, but it's not documented.I sort of assumed that the next release would be major for this reason, though admittedly that would probably be more of a pain for jsdom than just using the workaround. I'm not terribly clear on what the semver guarantees mean for codegen projects, much less for
domexception
and other projects whose public interface is only part codegen.