Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
lib: add %TypedArray% abstract constructor to primordials#36016
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
ExE-Boss commented Nov 7, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
aduh95 left a comment
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.
Thanks a lot for doing this! I like it way more than my hack in the other PR. Two comments:
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
benjamingr left a comment
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.
With Antoine's comments addressed :]
06d4cde to 4c11653CompareUh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
aduh95 commented Nov 7, 2020
nit: you can also replace two instances in --- a/lib/internal/freeze_intrinsics.js+++ b/lib/internal/freeze_intrinsics.js@@ -65,6 +65,7 @@ const{SymbolIterator, SyntaxError, TypeError, + TypedArrayPrototype, Uint16Array, Uint32Array, Uint8Array, @@ -105,7 +106,7 @@ module.exports = function(){// AsyncGeneratorFunction ObjectGetPrototypeOf(async function* (){}), // TypedArray - ObjectGetPrototypeOf(Uint8Array),+ TypedArrayPrototype, // 19 Fundamental Objects Object.prototype, // 19.1 @@ -189,7 +190,7 @@ module.exports = function(){// AsyncGeneratorFunction ObjectGetPrototypeOf(async function* (){}), // TypedArray - ObjectGetPrototypeOf(Uint8Array),+ TypedArrayPrototype, // 18 The Global Object eval, |
4c11653 to 15592ffCompareThere 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.
This is needed because of #35448 (comment).
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.
Can you open a separate PR for this?
freeze_intrinsics.js is executed before any user code, I don't think it's worth adding it to the primordials object: there's no security reason to do so, IMHO we should fix frozen_intrinsics.js code instead.
15592ff to 6d64af7CompareUh oh!
There was an error while loading. Please reload this page.
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.
Can you open a separate PR for this?
freeze_intrinsics.js is executed before any user code, I don't think it's worth adding it to the primordials object: there's no security reason to do so, IMHO we should fix frozen_intrinsics.js code instead.
aca2ee7 to 8fee9b7CompareRefs: nodejs#35448 Refs: nodejs#36003 Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object Co-authored-by: Antoine du Hamel <[email protected]>
nodejs-github-bot commented Nov 8, 2020
Landed in aa1eb1f...c925e24 |
Refs: #35448 Refs: #36003 Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #36016 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Shingo Inoue <[email protected]>
Refs: #35448 Refs: #36003 Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #36016 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Shingo Inoue <[email protected]>
Refs: #35448 Refs: #36003 Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #36016 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Shingo Inoue <[email protected]>
Refs: #35448 Refs: #36003 Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #36016 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Shingo Inoue <[email protected]>
Refs:#35448
Refs:#36003
Refs:https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesSupersedes and closes#32127
review?(@aduh95, @targos)