@poe-platform/safe-js 0.1.440 → 0.1.442
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/safe-js/chunks/{chunk-O6PAZGEO.js → chunk-7SGYDXE2.js} +2 -2
- package/dist/safe-js/chunks/{chunk-XCJLWZP7.js → chunk-GL3SJA4W.js} +76 -41
- package/dist/safe-js/chunks/chunk-GL3SJA4W.js.map +7 -0
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/index.js +2 -2
- package/dist/safe-js/interp/scope.d.ts +1 -0
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-XCJLWZP7.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-O6PAZGEO.js.map → chunk-7SGYDXE2.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-GL3SJA4W.js";
|
|
31
31
|
|
|
32
32
|
// packages/safe-js/src/migrate.ts
|
|
33
33
|
import { createHash } from "node:crypto";
|
|
@@ -8249,4 +8249,4 @@ export {
|
|
|
8249
8249
|
parseMcpConfig,
|
|
8250
8250
|
makeMcpModule
|
|
8251
8251
|
};
|
|
8252
|
-
//# sourceMappingURL=chunk-
|
|
8252
|
+
//# sourceMappingURL=chunk-7SGYDXE2.js.map
|
|
@@ -7626,6 +7626,9 @@ function serializedDateTime(value) {
|
|
|
7626
7626
|
return Number.isNaN(time) ? null : time;
|
|
7627
7627
|
}
|
|
7628
7628
|
|
|
7629
|
+
// packages/safe-js/src/interp/scope-data-roots.ts
|
|
7630
|
+
var scopeDataRoots = /* @__PURE__ */ new WeakMap();
|
|
7631
|
+
|
|
7629
7632
|
// packages/safe-js/src/error/native-suppressed-error.ts
|
|
7630
7633
|
function SuppressedError(error, suppressed, message) {
|
|
7631
7634
|
const prototype = new.target?.prototype;
|
|
@@ -9477,6 +9480,27 @@ var Scope = class _Scope {
|
|
|
9477
9480
|
}
|
|
9478
9481
|
return values;
|
|
9479
9482
|
}
|
|
9483
|
+
retainedDataRoots() {
|
|
9484
|
+
const values = this.parent?.retainedDataRoots() ?? [];
|
|
9485
|
+
if (this.moduleEnvironment !== void 0) values.push(...Object.values(this.moduleEnvironment.namespaces));
|
|
9486
|
+
if (this.resourceState !== void 0) values.push(this.resourceState);
|
|
9487
|
+
if (this.options.chargeData !== false) {
|
|
9488
|
+
if (this.importMeta !== void 0) values.push(this.importMeta);
|
|
9489
|
+
if (this.privateNames !== void 0) values.push(...this.privateNames.values());
|
|
9490
|
+
}
|
|
9491
|
+
const bindings = this.options.chargeData === false ? this.#replacedBindings : this.#bindings.values();
|
|
9492
|
+
for (const binding of bindings) {
|
|
9493
|
+
const value = binding.value;
|
|
9494
|
+
if (value === uninitialized || value == null || typeof value === "number" || typeof value === "boolean") continue;
|
|
9495
|
+
if (binding.accounting === void 0 || !Object.is(binding.accounting.value, value)) {
|
|
9496
|
+
const root = Object.freeze({});
|
|
9497
|
+
scopeDataRoots.set(root, { value });
|
|
9498
|
+
binding.accounting = { value, root };
|
|
9499
|
+
}
|
|
9500
|
+
values.push(binding.accounting.root);
|
|
9501
|
+
}
|
|
9502
|
+
return values;
|
|
9503
|
+
}
|
|
9480
9504
|
declare(name, kind, value) {
|
|
9481
9505
|
const existing = this.#bindings.get(name);
|
|
9482
9506
|
if (existing !== void 0 && existing.value !== uninitialized) {
|
|
@@ -9485,7 +9509,7 @@ var Scope = class _Scope {
|
|
|
9485
9509
|
if (existing !== void 0 && existing.kind !== kind) {
|
|
9486
9510
|
throw new Error(`Cannot redeclare binding '${name}' in the same scope.`);
|
|
9487
9511
|
}
|
|
9488
|
-
if (existing !== void 0) existing
|
|
9512
|
+
if (existing !== void 0) writeBindingValue(existing, value);
|
|
9489
9513
|
else this.#bindings.set(name, { kind, value });
|
|
9490
9514
|
}
|
|
9491
9515
|
declareAlias(name, target) {
|
|
@@ -9548,7 +9572,7 @@ var Scope = class _Scope {
|
|
|
9548
9572
|
if (binding.kind === "const") {
|
|
9549
9573
|
throw new TypeError(`Cannot assign to const binding '${name}'.`);
|
|
9550
9574
|
}
|
|
9551
|
-
binding
|
|
9575
|
+
writeBindingValue(binding, value);
|
|
9552
9576
|
scope.trackReplacement(name, binding);
|
|
9553
9577
|
}
|
|
9554
9578
|
lookup(name) {
|
|
@@ -9671,7 +9695,7 @@ var Scope = class _Scope {
|
|
|
9671
9695
|
}
|
|
9672
9696
|
const targetBinding = targetScope.#bindings.get(name);
|
|
9673
9697
|
targetBinding.kind = sourceBinding.kind;
|
|
9674
|
-
targetBinding
|
|
9698
|
+
writeBindingValue(targetBinding, sourceBinding.value);
|
|
9675
9699
|
}
|
|
9676
9700
|
}
|
|
9677
9701
|
resolveScope(name) {
|
|
@@ -9702,6 +9726,10 @@ var Scope = class _Scope {
|
|
|
9702
9726
|
};
|
|
9703
9727
|
}
|
|
9704
9728
|
};
|
|
9729
|
+
function writeBindingValue(binding, value) {
|
|
9730
|
+
if (!Object.is(binding.value, value)) binding.accounting = void 0;
|
|
9731
|
+
binding.value = value;
|
|
9732
|
+
}
|
|
9705
9733
|
function defineSnapshotBinding(target, name, value) {
|
|
9706
9734
|
Object.defineProperty(target, name, {
|
|
9707
9735
|
configurable: true,
|
|
@@ -13940,7 +13968,8 @@ function createObjectGlobal(methods2, budget) {
|
|
|
13940
13968
|
}
|
|
13941
13969
|
});
|
|
13942
13970
|
const properties = materializeFunctionProperties(constructor);
|
|
13943
|
-
const prototype = properties.prototype;
|
|
13971
|
+
const prototype = createIntrinsicObject(properties.prototype);
|
|
13972
|
+
properties.prototype = prototype;
|
|
13944
13973
|
Object.defineProperty(properties, "prototype", { writable: false });
|
|
13945
13974
|
for (const [name, method] of Object.entries(methods2)) {
|
|
13946
13975
|
Object.defineProperty(properties, name, { value: method, writable: true, configurable: true });
|
|
@@ -15785,7 +15814,7 @@ function createErrorConstructor(name, budget, guest) {
|
|
|
15785
15814
|
}
|
|
15786
15815
|
function createErrorPrototypes(budget, constructors2) {
|
|
15787
15816
|
const prototypes2 = /* @__PURE__ */ new Map();
|
|
15788
|
-
for (const name of errorNames) prototypes2.set(name,
|
|
15817
|
+
for (const name of errorNames) prototypes2.set(name, createIntrinsicObject());
|
|
15789
15818
|
errorPrototypes.set(budget, prototypes2);
|
|
15790
15819
|
for (const name of errorNames) {
|
|
15791
15820
|
const constructor = constructors2[name];
|
|
@@ -16287,7 +16316,7 @@ async function evaluateNode(node, context) {
|
|
|
16287
16316
|
function reconcileDataBudget(budget, stats, scope, transient, compilation, parent) {
|
|
16288
16317
|
reconcileCompiledValues(
|
|
16289
16318
|
budget,
|
|
16290
|
-
[...scope.
|
|
16319
|
+
[...scope.retainedDataRoots(), transient],
|
|
16291
16320
|
compilation,
|
|
16292
16321
|
parent,
|
|
16293
16322
|
[transient]
|
|
@@ -19901,7 +19930,7 @@ function createPrimitiveConstructor(options, budget) {
|
|
|
19901
19930
|
for (const [name, value] of methods2)
|
|
19902
19931
|
Object.defineProperty(prototype, name, { value, writable: true, configurable: true });
|
|
19903
19932
|
if (kind === "string") {
|
|
19904
|
-
const iteratorPrototype =
|
|
19933
|
+
const iteratorPrototype = createIntrinsicObject();
|
|
19905
19934
|
setSandboxPrototype(iteratorPrototype, resolveIntrinsicIdentity(budget, '["%IteratorPrototype%"]'));
|
|
19906
19935
|
Object.defineProperties(iteratorPrototype, {
|
|
19907
19936
|
next: { value: createSandboxClosure({
|
|
@@ -20271,8 +20300,8 @@ function createArrayGlobal(budget) {
|
|
|
20271
20300
|
configurable: true
|
|
20272
20301
|
});
|
|
20273
20302
|
Object.defineProperty(prototype, "constructor", { value: constructor, writable: true, configurable: true });
|
|
20274
|
-
const iteratorPrototype =
|
|
20275
|
-
const iterablePrototype =
|
|
20303
|
+
const iteratorPrototype = createIntrinsicObject();
|
|
20304
|
+
const iterablePrototype = createIntrinsicObject();
|
|
20276
20305
|
Object.defineProperty(iterablePrototype, Symbol.iterator, { value: createSandboxClosure({
|
|
20277
20306
|
guest: true,
|
|
20278
20307
|
sandbox: true,
|
|
@@ -21024,7 +21053,7 @@ function createClassConstructor(node, context, evaluateNode2, fields2) {
|
|
|
21024
21053
|
length: constructorElement === void 0 ? 0 : getFunctionLength(constructorElement.value.params),
|
|
21025
21054
|
sourceRange: functionSources.get(node),
|
|
21026
21055
|
retainedValues: () => {
|
|
21027
|
-
const values = [...scope.
|
|
21056
|
+
const values = [...scope.retainedDataRoots(), ...fields2.flatMap((field) => field.privateName === void 0 ? [field.key] : [field.key, field.privateName])];
|
|
21028
21057
|
for (const [name, element] of classOrigins.get(constructor)?.privateMethods ?? []) {
|
|
21029
21058
|
values.push(name);
|
|
21030
21059
|
if (element.kind === "accessor") values.push(element.get, element.set);
|
|
@@ -22529,7 +22558,7 @@ function createDateGlobal(options) {
|
|
|
22529
22558
|
}
|
|
22530
22559
|
);
|
|
22531
22560
|
const clock = wrapCallerInjectedBindings({ now: readNow }, { ...options, moduleId: "<Date>" }).now;
|
|
22532
|
-
const prototype =
|
|
22561
|
+
const prototype = createIntrinsicObject();
|
|
22533
22562
|
const constructor = createSandboxClosure({
|
|
22534
22563
|
guest: true,
|
|
22535
22564
|
sandbox: true,
|
|
@@ -22664,7 +22693,7 @@ async function dateToJSON(receiver, budget, context) {
|
|
|
22664
22693
|
function createConsoleJsonGlobals(options) {
|
|
22665
22694
|
const sink = options.sink ?? console;
|
|
22666
22695
|
const globals = {
|
|
22667
|
-
JSON: {
|
|
22696
|
+
JSON: createIntrinsicObject({
|
|
22668
22697
|
rawJSON: createSandboxClosure({
|
|
22669
22698
|
sandbox: true,
|
|
22670
22699
|
guest: true,
|
|
@@ -22705,7 +22734,7 @@ function createConsoleJsonGlobals(options) {
|
|
|
22705
22734
|
call: async ([value, replacer, indent], context) => stringifyJson(value, replacer, indent, options.budget, context),
|
|
22706
22735
|
name: "stringify"
|
|
22707
22736
|
})
|
|
22708
|
-
},
|
|
22737
|
+
}),
|
|
22709
22738
|
console: options.hostCalls === void 0 ? {
|
|
22710
22739
|
error: createSandboxClosure({
|
|
22711
22740
|
sandbox: true,
|
|
@@ -23078,7 +23107,7 @@ function installCollectionPrototypes(budget, mapConstructor, setConstructor) {
|
|
|
23078
23107
|
{ name: "Map", constructor: mapConstructor, methods: mapMethods, size: mapSize, iterator: mapMethods.entries },
|
|
23079
23108
|
{ name: "Set", constructor: setConstructor, methods: setMethods, size: setSize, iterator: setMethods.values }
|
|
23080
23109
|
]) {
|
|
23081
|
-
const prototype =
|
|
23110
|
+
const prototype = createIntrinsicObject();
|
|
23082
23111
|
const species = createSandboxClosure({
|
|
23083
23112
|
guest: true,
|
|
23084
23113
|
sandbox: true,
|
|
@@ -23100,7 +23129,7 @@ function installCollectionPrototypes(budget, mapConstructor, setConstructor) {
|
|
|
23100
23129
|
}
|
|
23101
23130
|
function installCollectionIteratorPrototypes(budget) {
|
|
23102
23131
|
for (const name of ["Map", "Set"]) {
|
|
23103
|
-
const iteratorPrototype =
|
|
23132
|
+
const iteratorPrototype = createIntrinsicObject();
|
|
23104
23133
|
const kind = name === "Map" ? "map" : "set";
|
|
23105
23134
|
const next = createSandboxClosure({
|
|
23106
23135
|
guest: true,
|
|
@@ -23635,7 +23664,7 @@ async function regexSplit(target, input, limit, constructor, budget, context) {
|
|
|
23635
23664
|
|
|
23636
23665
|
// packages/safe-js/src/interp/globals/regex.ts
|
|
23637
23666
|
function installRegExpIteratorPrototype(budget) {
|
|
23638
|
-
const prototype =
|
|
23667
|
+
const prototype = createIntrinsicObject();
|
|
23639
23668
|
setSandboxPrototype(prototype, resolveIntrinsicIdentity(budget, '["%IteratorPrototype%"]'));
|
|
23640
23669
|
Object.defineProperties(prototype, {
|
|
23641
23670
|
next: { value: getRegExpIteratorMember("next", budget), writable: true, configurable: true },
|
|
@@ -23747,7 +23776,7 @@ function createRegexGlobals(options) {
|
|
|
23747
23776
|
writable: true,
|
|
23748
23777
|
configurable: true
|
|
23749
23778
|
});
|
|
23750
|
-
const prototype =
|
|
23779
|
+
const prototype = createIntrinsicObject();
|
|
23751
23780
|
Object.defineProperty(materializeFunctionProperties(constructor), Symbol.species, {
|
|
23752
23781
|
get: accessorAdapter(createSandboxClosure({
|
|
23753
23782
|
sandbox: true,
|
|
@@ -24196,7 +24225,7 @@ function installAsyncIteratorDispose(prototype, budget) {
|
|
|
24196
24225
|
|
|
24197
24226
|
// packages/safe-js/src/interp/globals/generator.ts
|
|
24198
24227
|
function createGeneratorPrototypes(budget) {
|
|
24199
|
-
const asyncIteratorPrototype =
|
|
24228
|
+
const asyncIteratorPrototype = createIntrinsicObject();
|
|
24200
24229
|
const asyncIterator = createSandboxClosure({
|
|
24201
24230
|
guest: true,
|
|
24202
24231
|
sandbox: true,
|
|
@@ -24217,8 +24246,8 @@ function createGeneratorPrototypes(budget) {
|
|
|
24217
24246
|
const state = /* @__PURE__ */ new Map();
|
|
24218
24247
|
for (const async of [false, true]) {
|
|
24219
24248
|
const tag = async ? "AsyncGenerator" : "Generator";
|
|
24220
|
-
const functionPrototype =
|
|
24221
|
-
const instancePrototype =
|
|
24249
|
+
const functionPrototype = createIntrinsicObject();
|
|
24250
|
+
const instancePrototype = createIntrinsicObject();
|
|
24222
24251
|
setSandboxPrototype(functionPrototype, resolveIntrinsicIdentity(budget, JSON.stringify(["%FunctionPrototype%"])));
|
|
24223
24252
|
setSandboxPrototype(instancePrototype, async ? asyncIteratorPrototype : resolveIntrinsicIdentity(budget, JSON.stringify(["%IteratorPrototype%"])));
|
|
24224
24253
|
Object.defineProperties(functionPrototype, {
|
|
@@ -24257,7 +24286,7 @@ function createGeneratorPrototypes(budget) {
|
|
|
24257
24286
|
|
|
24258
24287
|
// packages/safe-js/src/interp/globals/iterator-from.ts
|
|
24259
24288
|
function installIteratorFrom(constructor, budget) {
|
|
24260
|
-
const prototype =
|
|
24289
|
+
const prototype = createIntrinsicObject();
|
|
24261
24290
|
setSandboxPrototype(prototype, resolveIntrinsicIdentity(budget, '["%IteratorPrototype%"]'));
|
|
24262
24291
|
for (const name of ["next", "return"]) {
|
|
24263
24292
|
Object.defineProperty(prototype, name, { writable: true, configurable: true, value: createSandboxClosure({
|
|
@@ -24410,7 +24439,7 @@ function installIteratorConsumers(prototype, budget) {
|
|
|
24410
24439
|
|
|
24411
24440
|
// packages/safe-js/src/interp/globals/iterator-lazy.ts
|
|
24412
24441
|
function installLazyIteratorHelpers(common, budget) {
|
|
24413
|
-
const prototype =
|
|
24442
|
+
const prototype = createIntrinsicObject();
|
|
24414
24443
|
setSandboxPrototype(prototype, common);
|
|
24415
24444
|
Object.defineProperty(prototype, Symbol.toStringTag, { value: "Iterator Helper", configurable: true });
|
|
24416
24445
|
for (const operation of ["next", "return"]) {
|
|
@@ -24649,7 +24678,7 @@ function createIteratorGlobal(budget) {
|
|
|
24649
24678
|
|
|
24650
24679
|
// packages/safe-js/src/interp/globals/disposable-stack.ts
|
|
24651
24680
|
function createDisposableStackGlobal(budget) {
|
|
24652
|
-
const prototype =
|
|
24681
|
+
const prototype = createIntrinsicObject();
|
|
24653
24682
|
setSandboxPrototype(prototype, getSandboxPrototype(/* @__PURE__ */ Object.create(null), budget));
|
|
24654
24683
|
const constructor = createSandboxClosure({
|
|
24655
24684
|
guest: true,
|
|
@@ -24771,7 +24800,7 @@ function requireState(receiver) {
|
|
|
24771
24800
|
|
|
24772
24801
|
// packages/safe-js/src/interp/globals/async-disposable-stack.ts
|
|
24773
24802
|
function createAsyncDisposableStackGlobal(budget) {
|
|
24774
|
-
const prototype =
|
|
24803
|
+
const prototype = createIntrinsicObject();
|
|
24775
24804
|
setSandboxPrototype(prototype, getSandboxPrototype(/* @__PURE__ */ Object.create(null), budget));
|
|
24776
24805
|
const constructor = createSandboxClosure({
|
|
24777
24806
|
guest: true,
|
|
@@ -25021,7 +25050,7 @@ function createSymbolGlobal(budget) {
|
|
|
25021
25050
|
var resizeBuffer3 = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "resize")?.value;
|
|
25022
25051
|
var transferBuffer2 = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "transfer")?.value;
|
|
25023
25052
|
function createArrayBufferGlobal(budget) {
|
|
25024
|
-
const prototype =
|
|
25053
|
+
const prototype = createIntrinsicObject();
|
|
25025
25054
|
const constructor = createSandboxClosure({
|
|
25026
25055
|
guest: true,
|
|
25027
25056
|
sandbox: true,
|
|
@@ -25288,7 +25317,7 @@ methods.setFloat16 = function(...args) {
|
|
|
25288
25317
|
return Reflect.apply(writeUint16, this, [args[0], sign | bits, args[2]]);
|
|
25289
25318
|
};
|
|
25290
25319
|
function createDataViewGlobal(budget) {
|
|
25291
|
-
const prototype =
|
|
25320
|
+
const prototype = createIntrinsicObject();
|
|
25292
25321
|
const constructor = createSandboxClosure({
|
|
25293
25322
|
guest: true,
|
|
25294
25323
|
sandbox: true,
|
|
@@ -25485,7 +25514,7 @@ function createReflectGlobal(budget) {
|
|
|
25485
25514
|
}, context.stack, context);
|
|
25486
25515
|
} }
|
|
25487
25516
|
};
|
|
25488
|
-
const reflect = {};
|
|
25517
|
+
const reflect = createIntrinsicObject({});
|
|
25489
25518
|
for (const name of nativeReflectPropertyNames) {
|
|
25490
25519
|
const method = methods2[name];
|
|
25491
25520
|
if (method === void 0) continue;
|
|
@@ -28301,7 +28330,7 @@ async function callPromiseClosure(callback, args, thisValue, budget, context) {
|
|
|
28301
28330
|
function getPromisePrototype(budget) {
|
|
28302
28331
|
const existing = promisePrototypes2.get(budget);
|
|
28303
28332
|
if (existing !== void 0) return existing;
|
|
28304
|
-
const prototype = {
|
|
28333
|
+
const prototype = createIntrinsicObject({
|
|
28305
28334
|
then: createSandboxClosure({
|
|
28306
28335
|
sandbox: true,
|
|
28307
28336
|
call: ([onFulfilled, onRejected], context) => {
|
|
@@ -28462,7 +28491,7 @@ function getPromisePrototype(budget) {
|
|
|
28462
28491
|
name: "finally",
|
|
28463
28492
|
length: 1
|
|
28464
28493
|
})
|
|
28465
|
-
};
|
|
28494
|
+
});
|
|
28466
28495
|
intrinsicPromiseThenMethods.add(prototype.then);
|
|
28467
28496
|
for (const name of Object.keys(prototype)) {
|
|
28468
28497
|
Object.defineProperty(prototype, name, { enumerable: false });
|
|
@@ -29514,6 +29543,12 @@ function measureSandboxData(values, options = {}) {
|
|
|
29514
29543
|
}
|
|
29515
29544
|
if (typeof value !== "object" || value === null) return;
|
|
29516
29545
|
if (seen.has(value)) return;
|
|
29546
|
+
const bindingRoot = scopeDataRoots.get(value);
|
|
29547
|
+
if (bindingRoot !== void 0) {
|
|
29548
|
+
seen.add(value);
|
|
29549
|
+
visit(bindingRoot.value, depth);
|
|
29550
|
+
return;
|
|
29551
|
+
}
|
|
29517
29552
|
assertSandboxDataDepth(depth);
|
|
29518
29553
|
seen.add(value);
|
|
29519
29554
|
usage += 1;
|
|
@@ -32623,7 +32658,7 @@ function createInterpretedClosure(node, context, evaluateNode2, homeObject, init
|
|
|
32623
32658
|
...node.type === "FunctionDeclaration" || node.type === "FunctionExpression" ? node.id === void 0 ? { name: context.inferredName } : { name: node.id.name } : { name: context.inferredName },
|
|
32624
32659
|
...construct === void 0 ? {} : { construct },
|
|
32625
32660
|
retainedValues: () => {
|
|
32626
|
-
const values = [...context.scope.
|
|
32661
|
+
const values = [...context.scope.retainedDataRoots(), context.functionEnvironment?.homeObject, context.functionEnvironment?.newTarget];
|
|
32627
32662
|
if (constructionState !== void 0) {
|
|
32628
32663
|
values.push(
|
|
32629
32664
|
constructionState.constructor,
|
|
@@ -32631,7 +32666,7 @@ function createInterpretedClosure(node, context, evaluateNode2, homeObject, init
|
|
|
32631
32666
|
constructionState.prototype,
|
|
32632
32667
|
constructionState.thisValue
|
|
32633
32668
|
);
|
|
32634
|
-
if (constructionState.thisScope !== void 0) values.push(...constructionState.thisScope.
|
|
32669
|
+
if (constructionState.thisScope !== void 0) values.push(...constructionState.thisScope.retainedDataRoots());
|
|
32635
32670
|
}
|
|
32636
32671
|
return values;
|
|
32637
32672
|
},
|
|
@@ -32679,7 +32714,7 @@ function createInterpretedClosure(node, context, evaluateNode2, homeObject, init
|
|
|
32679
32714
|
}
|
|
32680
32715
|
});
|
|
32681
32716
|
const value = "hasValue" in result && result.hasValue ? result.value : void 0;
|
|
32682
|
-
reconcileCompiledValues(context.budget, [...scope.
|
|
32717
|
+
reconcileCompiledValues(context.budget, [...scope.retainedDataRoots(), value], compilation, parent, [value]);
|
|
32683
32718
|
if (result.kind === "error") throw result.error;
|
|
32684
32719
|
if (result.kind === "throw") throw result.value;
|
|
32685
32720
|
return value;
|
|
@@ -32737,7 +32772,7 @@ function createGeneratorClosure(node, context, evaluateNode2, initializePrototyp
|
|
|
32737
32772
|
sandbox: true,
|
|
32738
32773
|
length: getFunctionLength(node.params),
|
|
32739
32774
|
...node.id === void 0 ? { name: context.inferredName } : { name: node.id.name },
|
|
32740
|
-
retainedValues: () => [...context.scope.
|
|
32775
|
+
retainedValues: () => [...context.scope.retainedDataRoots(), context.functionEnvironment?.homeObject, context.functionEnvironment?.newTarget],
|
|
32741
32776
|
call: async (args, callContext) => {
|
|
32742
32777
|
const candidate = prototypes2 === void 0 ? void 0 : getGuestFunctionProperty(closure, "prototype");
|
|
32743
32778
|
const prototype = typeof candidate === "object" && candidate !== null ? candidate : prototypes2?.instancePrototype;
|
|
@@ -32906,7 +32941,7 @@ async function executeClosure(node, args, thisValue, context, evaluateNode2) {
|
|
|
32906
32941
|
const value = "hasValue" in result && result.hasValue ? result.value : void 0;
|
|
32907
32942
|
reconcileCompiledValues(
|
|
32908
32943
|
context.budget,
|
|
32909
|
-
[...scope.
|
|
32944
|
+
[...scope.retainedDataRoots(), value],
|
|
32910
32945
|
compilation,
|
|
32911
32946
|
parent,
|
|
32912
32947
|
[value]
|
|
@@ -45661,7 +45696,7 @@ var RealmState = class {
|
|
|
45661
45696
|
}
|
|
45662
45697
|
if (captured.length > 0)
|
|
45663
45698
|
this.budget.reconcileDataUsage(
|
|
45664
|
-
measureSandboxData([...this.scope?.
|
|
45699
|
+
measureSandboxData([...this.scope?.retainedDataRoots() ?? [], ...this.retainedRoots()])
|
|
45665
45700
|
);
|
|
45666
45701
|
return { args: values, rollback };
|
|
45667
45702
|
} catch (error) {
|
|
@@ -45677,7 +45712,7 @@ var RealmState = class {
|
|
|
45677
45712
|
if (this.active === void 0)
|
|
45678
45713
|
reconcileCompiledValues(
|
|
45679
45714
|
this.budget,
|
|
45680
|
-
[...this.scope?.
|
|
45715
|
+
[...this.scope?.retainedDataRoots() ?? [], ...this.retainedRoots()],
|
|
45681
45716
|
this.compilation
|
|
45682
45717
|
);
|
|
45683
45718
|
};
|
|
@@ -45860,7 +45895,7 @@ var RealmState = class {
|
|
|
45860
45895
|
});
|
|
45861
45896
|
try {
|
|
45862
45897
|
this.budget.reconcileDataUsage(
|
|
45863
|
-
measureSandboxData([...this.scope?.
|
|
45898
|
+
measureSandboxData([...this.scope?.retainedDataRoots() ?? [], ...this.retainedRoots()])
|
|
45864
45899
|
);
|
|
45865
45900
|
} catch (error) {
|
|
45866
45901
|
this.poison(error);
|
|
@@ -45875,7 +45910,7 @@ var RealmState = class {
|
|
|
45875
45910
|
if (this.active === void 0)
|
|
45876
45911
|
reconcileCompiledValues(
|
|
45877
45912
|
this.budget,
|
|
45878
|
-
[...this.scope?.
|
|
45913
|
+
[...this.scope?.retainedDataRoots() ?? [], ...this.retainedRoots()],
|
|
45879
45914
|
this.compilation
|
|
45880
45915
|
);
|
|
45881
45916
|
};
|
|
@@ -45949,7 +45984,7 @@ var RealmState = class {
|
|
|
45949
45984
|
if (!this.closed && this.active === void 0)
|
|
45950
45985
|
reconcileCompiledValues(
|
|
45951
45986
|
this.budget,
|
|
45952
|
-
[...this.scope?.
|
|
45987
|
+
[...this.scope?.retainedDataRoots() ?? [], ...this.retainedRoots()],
|
|
45953
45988
|
this.compilation
|
|
45954
45989
|
);
|
|
45955
45990
|
}
|
|
@@ -46151,7 +46186,7 @@ var RealmState = class {
|
|
|
46151
46186
|
if (!this.closed)
|
|
46152
46187
|
reconcileCompiledValues(
|
|
46153
46188
|
this.budget,
|
|
46154
|
-
[...this.scope?.
|
|
46189
|
+
[...this.scope?.retainedDataRoots() ?? [], ...this.retainedRoots()],
|
|
46155
46190
|
this.compilation
|
|
46156
46191
|
);
|
|
46157
46192
|
return result;
|
|
@@ -47559,4 +47594,4 @@ export {
|
|
|
47559
47594
|
FileSnapshotBackend,
|
|
47560
47595
|
run
|
|
47561
47596
|
};
|
|
47562
|
-
//# sourceMappingURL=chunk-
|
|
47597
|
+
//# sourceMappingURL=chunk-GL3SJA4W.js.map
|