mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(executioncontext): support bigints transferring (#4016)
Refs: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-UnserializableValue
This commit is contained in:
committed by
Andrey Lushnikov
parent
27cf8594c2
commit
854b1c0912
@@ -127,6 +127,8 @@ class ExecutionContext {
|
||||
* @this {ExecutionContext}
|
||||
*/
|
||||
function convertArgument(arg) {
|
||||
if (typeof arg === 'bigint') // eslint-disable-line valid-typeof
|
||||
return { unserializableValue: `${arg.toString()}n` };
|
||||
if (Object.is(arg, -0))
|
||||
return { unserializableValue: '-0' };
|
||||
if (Object.is(arg, Infinity))
|
||||
|
||||
Reference in New Issue
Block a user