Skip to content

Commit

Permalink
linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed Jul 31, 2024
1 parent c68e212 commit 56f1917
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/setup-sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const {
} = localReflect;

const speciesSymbol = Symbol.species;
class localPromise extends global.Promise {}

const localReflectApply = (target, thisArg, args) => {
if (thisArg instanceof localPromise && thisArg.constructor[speciesSymbol] !== localPromise) {
throw new Error('Sandbox escape attempt blocked');
Expand Down Expand Up @@ -71,7 +73,6 @@ function localUnexpected() {
// global is originally prototype of host.Object so it can be used to climb up from the sandbox.
if (!localReflectSetPrototypeOf(context, localObject.prototype)) throw localUnexpected();

class localPromise extends global.Promise {}
Object.defineProperties(global, {
global: {value: global, writable: true, configurable: true, enumerable: true},
globalThis: {value: global, writable: true, configurable: true},
Expand Down

0 comments on commit 56f1917

Please sign in to comment.