Skip to content

Commit e6d87ab

Browse files
committed
Workaround for broken Proxies
1 parent 4238570 commit e6d87ab

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

docs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/custom.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ export const handleCustomType = async (node) => {
8080
if (Number.isSafeInteger(cfg?.experimental_ffi_timeout))
8181
globalThis.reflected_ffi_timeout = cfg.experimental_ffi_timeout;
8282

83+
if (runtime === 'micropython' || runtime === 'mpy')
84+
globalThis.reflected_ffi_no_symbol = true;
85+
8386
const xworker = XW.call(new Hook(null, hooks), worker, {
8487
...nodeInfo(node, type),
8588
configURL: url,

esm/worker/class.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default (...args) =>
3939
const serviceWorker = options?.serviceWorker || options?.service_worker;
4040
const worker = xworker({
4141
serviceWorker,
42+
reflected_ffi_no_symbol: !!globalThis.reflected_ffi_no_symbol,
4243
reflected_ffi_timeout: globalThis.reflected_ffi_timeout ?? -1,
4344
});
4445
const { postMessage } = worker;

0 commit comments

Comments
 (0)