fix: Move NativeErrors list to whitelist.js
MODIFY
packages/ses/src/tame-error-constructor.js
packages/ses/src/tame-error-constructor.js
@@ -5,16 +5,7 @@ import {
setPrototypeOf,
} from './commons.js';
import { tameV8ErrorConstructor } from './tame-v8-error-constructor.js';
-
-// TODO where should this go?
-export const NativeErrors = [
- EvalError,
- RangeError,
- ReferenceError,
- SyntaxError,
- TypeError,
- URIError,
-];
+import { NativeErrors } from './whitelist.js';
// Use concise methods to obtain named functions without constructors.
const tamedMethods = {

MODIFY
packages/ses/src/whitelist.js
packages/ses/src/whitelist.js
@@ -167,6 +167,17 @@ export const uniqueGlobalPropertyNames = {
// 'Realm',
};
+// All the "subclasses" of Error. These are collectively represented in the
+// EcmaScript spec by the meta variable NativeError.
+export const NativeErrors = [
+ EvalError,
+ RangeError,
+ ReferenceError,
+ SyntaxError,
+ TypeError,
+ URIError,
+];
+
/**
* <p>Each JSON record enumerates the disposition of the properties on
* some corresponding intrinsic object.

fix: Move NativeErrors list to whitelist.js (#444)