lib: add %TypedArray% abstract constructor to primordials#36016
lib: add %TypedArray% abstract constructor to primordials#36016ExE-Boss wants to merge 1 commit intonodejs:masterfrom
Conversation
aduh95
left a comment
There was a problem hiding this comment.
Thanks a lot for doing this! I like it way more than my hack in the other PR. Two comments:
benjamingr
left a comment
There was a problem hiding this comment.
With Antoine's comments addressed :]
06d4cde to
4c11653
Compare
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.
|
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
15592ff
Compare
There was a problem hiding this comment.
This is needed because of #35448 (comment).
There was a problem hiding this comment.
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
6d64af7
Compare
There was a problem hiding this comment.
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
8fee9b7
Compare
Refs: nodejs#35448 Refs: nodejs#36003 Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
|
Landed in aa1eb1f...c925e24 |
Refs: #35448 Refs: #36003 Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #36016 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Refs: #35448 Refs: #36003 Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #36016 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Refs: #35448 Refs: #36003 Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #36016 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Refs: #35448 Refs: #36003 Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #36016 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
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)