chore: use deep serialization zero for Handles (#10848)
This commit is contained in:
parent
34953dc3f0
commit
7ac04eb2e5
@ -140,6 +140,12 @@ export class Realm extends EventEmitter {
|
|||||||
const resultOwnership = returnByValue
|
const resultOwnership = returnByValue
|
||||||
? Bidi.Script.ResultOwnership.None
|
? Bidi.Script.ResultOwnership.None
|
||||||
: Bidi.Script.ResultOwnership.Root;
|
: Bidi.Script.ResultOwnership.Root;
|
||||||
|
const serializationOptions: Bidi.Script.SerializationOptions = returnByValue
|
||||||
|
? {}
|
||||||
|
: {
|
||||||
|
maxObjectDepth: 0,
|
||||||
|
maxDomDepth: 0,
|
||||||
|
};
|
||||||
if (isString(pageFunction)) {
|
if (isString(pageFunction)) {
|
||||||
const expression = SOURCE_URL_REGEX.test(pageFunction)
|
const expression = SOURCE_URL_REGEX.test(pageFunction)
|
||||||
? pageFunction
|
? pageFunction
|
||||||
@ -151,6 +157,7 @@ export class Realm extends EventEmitter {
|
|||||||
resultOwnership,
|
resultOwnership,
|
||||||
awaitPromise: true,
|
awaitPromise: true,
|
||||||
userActivation: true,
|
userActivation: true,
|
||||||
|
serializationOptions,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let functionDeclaration = stringifyFunction(pageFunction);
|
let functionDeclaration = stringifyFunction(pageFunction);
|
||||||
@ -168,6 +175,7 @@ export class Realm extends EventEmitter {
|
|||||||
resultOwnership,
|
resultOwnership,
|
||||||
awaitPromise: true,
|
awaitPromise: true,
|
||||||
userActivation: true,
|
userActivation: true,
|
||||||
|
serializationOptions,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user