mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
lib: fix use of --frozen-intrinsics with --jitless
PR-URL: https://github.com/nodejs/node/pull/51248 Fixes: https://github.com/nodejs/node/issues/51232 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
@@ -220,13 +220,6 @@ module.exports = function() {
|
||||
|
||||
// Other APIs / Web Compatibility
|
||||
Console.prototype,
|
||||
WebAssembly.Module.prototype,
|
||||
WebAssembly.Instance.prototype,
|
||||
WebAssembly.Table.prototype,
|
||||
WebAssembly.Memory.prototype,
|
||||
WebAssembly.CompileError.prototype,
|
||||
WebAssembly.LinkError.prototype,
|
||||
WebAssembly.RuntimeError.prototype,
|
||||
];
|
||||
const intrinsics = [
|
||||
// 10.2.4.1 ThrowTypeError
|
||||
@@ -349,7 +342,6 @@ module.exports = function() {
|
||||
setInterval,
|
||||
setTimeout,
|
||||
console,
|
||||
WebAssembly,
|
||||
];
|
||||
|
||||
if (typeof SharedArrayBuffer !== 'undefined') { // 25.2
|
||||
@@ -357,6 +349,19 @@ module.exports = function() {
|
||||
ArrayPrototypePush(intrinsics, SharedArrayBuffer);
|
||||
}
|
||||
|
||||
if (typeof WebAssembly !== 'undefined') {
|
||||
ArrayPrototypePush(intrinsicPrototypes,
|
||||
WebAssembly.Module.prototype,
|
||||
WebAssembly.Instance.prototype,
|
||||
WebAssembly.Table.prototype,
|
||||
WebAssembly.Memory.prototype,
|
||||
WebAssembly.CompileError.prototype,
|
||||
WebAssembly.LinkError.prototype,
|
||||
WebAssembly.RuntimeError.prototype,
|
||||
);
|
||||
ArrayPrototypePush(intrinsics, WebAssembly);
|
||||
}
|
||||
|
||||
if (typeof Intl !== 'undefined') {
|
||||
ArrayPrototypePush(intrinsicPrototypes,
|
||||
Intl.Collator.prototype,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Flags: --frozen-intrinsics
|
||||
// Flags: --frozen-intrinsics --jitless
|
||||
'use strict';
|
||||
require('../common');
|
||||
const assert = require('assert');
|
||||
|
||||
Reference in New Issue
Block a user