diff options
| author | Bradley Farias <bradley.meck@gmail.com> | 2021-02-09 13:21:18 -0600 |
|---|---|---|
| committer | Bradley Farias <bradley.meck@gmail.com> | 2021-02-09 13:21:18 -0600 |
| commit | 31fbfc80728c2e786506004480029ce4153533a6 (patch) | |
| tree | 2fff17d3f9d77bbba6f47592aecb2739bd9dd6e1 | |
| parent | 22c442f833754f1c3802477c041d1d71feaf16c3 (diff) | |
| download | node-new-policy-scope-fix.tar.gz | |
| -rw-r--r-- | lib/internal/policy/manifest.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/internal/policy/manifest.js b/lib/internal/policy/manifest.js index d22847d987..62d4746a47 100644 --- a/lib/internal/policy/manifest.js +++ b/lib/internal/policy/manifest.js @@ -41,6 +41,8 @@ const shouldAbortOnUncaughtException = getOptionValue('--abort-on-uncaught-exception'); const { abort, exit, _rawDebug } = process; +const TERMINATE = () => null; + // From https://url.spec.whatwg.org/#special-scheme const SPECIAL_SCHEMES = new SafeSet([ 'file:', @@ -139,6 +141,8 @@ class Manifest { */ constructor(obj, manifestURL) { const scopes = this.#scopeDependencies; + scopes.set(null, TERMINATE); + scopes.set(undefined, TERMINATE); const integrities = this.#resourceIntegrities; const dependencies = this.#resourceDependencies; let reaction = REACTION_THROW; |
