From a84e6057d367282efdf3f1a1f80c3f0982252ffa Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:42:44 +0000 Subject: [PATCH 1/2] fix: native typing and missing ref lib in worker context --- deno-dom-native.ts | 12 ++++++------ test/wpt-runner-worker.ts | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/deno-dom-native.ts b/deno-dom-native.ts index 390bc76..af99c97 100644 --- a/deno-dom-native.ts +++ b/deno-dom-native.ts @@ -110,14 +110,14 @@ const returnBufSizeLen = new Uint8Array(returnBufSizeLenRaw); type DocumentParser = ( srcBuf: Uint8Array, - srcLength: number, + srcLength: bigint, returnBuf: Uint8Array, ) => void; type FragmentParser = ( srcBuf: Uint8Array, - srcLength: number, + srcLength: bigint, contextLocalNameBuf: Uint8Array, - contextLocalNameLength: number, + contextLocalNameLength: bigint, returnBuf: Uint8Array, ) => void; @@ -131,15 +131,15 @@ function genericParse( const encodedContextLocalName = utf8Encoder.encode(contextLocalName); (parser as FragmentParser)( encodedHtml, - encodedHtml.length, + BigInt(encodedHtml.length), encodedContextLocalName, - encodedContextLocalName.length, + BigInt(encodedContextLocalName.length), returnBufSizeLen, ); } else { (parser as DocumentParser)( encodedHtml, - encodedHtml.length, + BigInt(encodedHtml.length), returnBufSizeLen, ); } diff --git a/test/wpt-runner-worker.ts b/test/wpt-runner-worker.ts index ff65042..5705da5 100644 --- a/test/wpt-runner-worker.ts +++ b/test/wpt-runner-worker.ts @@ -1,3 +1,4 @@ +/// type TestSetupEvent = { data: { backend: "wasm" | "native"; From 2c89bbb1f0cb459d5676d070fd2f7cca7d7b231f Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:43:41 +0000 Subject: [PATCH 2/2] ci