diff options
Diffstat (limited to 'lib/internal/process/policy.js')
-rw-r--r-- | lib/internal/process/policy.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/internal/process/policy.js b/lib/internal/process/policy.js index d2501403c3..ea283a4497 100644 --- a/lib/internal/process/policy.js +++ b/lib/internal/process/policy.js @@ -1,6 +1,10 @@ 'use strict'; -const { JSON, Object, Reflect } = primordials; +const { + JSONParse, + ObjectFreeze, + ReflectSetPrototypeOf, +} = primordials; const { ERR_MANIFEST_TDZ, @@ -10,7 +14,7 @@ let manifest; let manifestSrc; let manifestURL; -module.exports = Object.freeze({ +module.exports = ObjectFreeze({ __proto__: null, setup(src, url) { manifestSrc = src; @@ -20,10 +24,10 @@ module.exports = Object.freeze({ return; } - const json = JSON.parse(src, (_, o) => { + const json = JSONParse(src, (_, o) => { if (o && typeof o === 'object') { - Reflect.setPrototypeOf(o, null); - Object.freeze(o); + ReflectSetPrototypeOf(o, null); + ObjectFreeze(o); } return o; }); |