-
Notifications
You must be signed in to change notification settings - Fork 106
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
spec: GetOption reform for ECMA 2021 #538
Merged
Merged
Conversation
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
Fix ECMA 2021 additions (Intl.DisplayNames and Intl.ListFormat) to work with the new, stricter GetOption. This no longer coerces non-null primitives to objects and instead throws a TypeError. Fixes: tc39#537
ljharb
reviewed
Feb 16, 2021
ptomato
reviewed
Feb 16, 2021
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
leobalter
approved these changes
Feb 18, 2021
Thanks @leobalter |
This was referenced Feb 19, 2021
webkit-commit-queue
pushed a commit
to WebKit/WebKit
that referenced
this pull request
Feb 19, 2021
https://bugs.webkit.org/show_bug.cgi?id=222164 Reviewed by Alexey Shvayka. JSTests: * stress/intl-get-options-not-using-toobject.js: Added. (shouldThrow): Source/JavaScriptCore: New spec change[1] introduced stricter GetOptionsObject for relatively new Intl constructors: Intl.DisplayNames, Intl.ListFormat, and Intl.Segmenter[2]. This does not perform `ToObject`, and instead, 1. If the input is an undefined, then it returns empty object. 2. If the input is an object, then it returns this object. 3. Otherwise, throwing a TypeError. This patch implements it. [1]: tc39/ecma402#538 [2]: tc39/proposal-intl-segmenter#132 * runtime/IntlDisplayNames.cpp: (JSC::IntlDisplayNames::initializeDisplayNames): * runtime/IntlListFormat.cpp: (JSC::IntlListFormat::initializeListFormat): * runtime/IntlObjectInlines.h: (JSC::intlGetOptionsObject): * runtime/IntlSegmenter.cpp: (JSC::IntlSegmenter::initializeSegmenter): Canonical link: https://commits.webkit.org/234348@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
philn
pushed a commit
to philn/old-webkit
that referenced
this pull request
Feb 21, 2021
https://bugs.webkit.org/show_bug.cgi?id=222164 Reviewed by Alexey Shvayka. JSTests: * stress/intl-get-options-not-using-toobject.js: Added. (shouldThrow): Source/JavaScriptCore: New spec change[1] introduced stricter GetOptionsObject for relatively new Intl constructors: Intl.DisplayNames, Intl.ListFormat, and Intl.Segmenter[2]. This does not perform `ToObject`, and instead, 1. If the input is an undefined, then it returns empty object. 2. If the input is an object, then it returns this object. 3. Otherwise, throwing a TypeError. This patch implements it. [1]: tc39/ecma402#538 [2]: tc39/proposal-intl-segmenter#132 * runtime/IntlDisplayNames.cpp: (JSC::IntlDisplayNames::initializeDisplayNames): * runtime/IntlListFormat.cpp: (JSC::IntlListFormat::initializeListFormat): * runtime/IntlObjectInlines.h: (JSC::intlGetOptionsObject): * runtime/IntlSegmenter.cpp: (JSC::IntlSegmenter::initializeSegmenter): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@273153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
anba
added a commit
to anba/ecma402
that referenced
this pull request
Feb 25, 2021
…gument. Issue tc39#538 undid the resolution from tc39/proposal-intl-displaynames#73, see also tc39/proposal-intl-displaynames#83.
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Mar 11, 2021
…yulia Implement the changes from <tc39/ecma402#538>. Depends on D107651 Differential Revision: https://phabricator.services.mozilla.com/D107652
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
Mar 15, 2021
…yulia Implement the changes from <tc39/ecma402#538>. Depends on D107651 Differential Revision: https://phabricator.services.mozilla.com/D107652 UltraBlame original commit: bf6ac6e433455a5b9073284d3e4142b87249eb24
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
Mar 15, 2021
…yulia Implement the changes from <tc39/ecma402#538>. Depends on D107651 Differential Revision: https://phabricator.services.mozilla.com/D107652 UltraBlame original commit: bf6ac6e433455a5b9073284d3e4142b87249eb24
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
Mar 15, 2021
…yulia Implement the changes from <tc39/ecma402#538>. Depends on D107651 Differential Revision: https://phabricator.services.mozilla.com/D107652 UltraBlame original commit: bf6ac6e433455a5b9073284d3e4142b87249eb24
aosmond
pushed a commit
to aosmond/gecko
that referenced
this pull request
Nov 27, 2021
…yulia Implement the changes from <tc39/ecma402#538>. Depends on D107651 Differential Revision: https://phabricator.services.mozilla.com/D107652
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix ECMA 2021 additions (Intl.DisplayNames and Intl.ListFormat) to work
with the new, stricter GetOption. This no longer coerces non-null
primitives to objects and instead throws a TypeError.
Fixes: #537
/cc @sffc @ptomato