mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-17 08:00:02 -04:00
cull paths unlikely to escape & add strictRewrites flag
This commit is contained in:
parent
ba0aa479f0
commit
bdf5fd4f95
6 changed files with 25 additions and 7 deletions
|
@ -45,12 +45,13 @@ export default function (client: ScramjetClient, self: typeof globalThis) {
|
|||
|
||||
client.Proxy("Promise.prototype.catch", {
|
||||
apply(ctx) {
|
||||
ctx.args[0] = new Proxy(ctx.args[0], {
|
||||
apply(target, thisArg, argArray) {
|
||||
// console.warn("CAUGHT PROMISE REJECTION", argArray);
|
||||
Reflect.apply(target, thisArg, argArray);
|
||||
},
|
||||
});
|
||||
if (ctx.args[0])
|
||||
ctx.args[0] = new Proxy(ctx.args[0], {
|
||||
apply(target, thisArg, argArray) {
|
||||
// console.warn("CAUGHT PROMISE REJECTION", argArray);
|
||||
Reflect.apply(target, thisArg, argArray);
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue