We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3da36d0 commit 914d6c9Copy full SHA for 914d6c9
lib/internal/per_context/domexception.js
@@ -1,8 +1,11 @@
1
'use strict';
2
3
-// `per_context` scripts are executed before creating the primordials so we
4
-// cannot use them here.
5
-/* eslint-disable no-restricted-globals */
+const {
+ SafeWeakMap,
+ SafeMap,
6
+ Object,
7
+ Symbol
8
+} = primordials;
9
10
class ERR_INVALID_THIS extends TypeError {
11
constructor(type) {
@@ -12,9 +15,9 @@ class ERR_INVALID_THIS extends TypeError {
12
15
get code() { return 'ERR_INVALID_THIS'; }
13
16
}
14
17
-const internalsMap = new WeakMap();
18
+const internalsMap = new SafeWeakMap();
19
-const nameToCodeMap = new Map();
20
+const nameToCodeMap = new SafeMap();
21
22
class DOMException extends Error {
23
constructor(message = '', name = 'Error') {
0 commit comments