Repository navigation
Add a structuredClone() global - #518
Closed
dan-distributive wants to merge 2 commits into
Closed
dan-distributive wants to merge 2 commits into
dan-distributive wants to merge 2 commits into
Conversation
dcp-client's supervisor clones its origin-access templates and error shapes with structuredClone(), which SpiderMonkey's shell globals don't provide, so localExec() under PythonMonkey stops there. Use core-js's polyfill, as url.js and dom-exception.js already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 11, 2026
Contributor
Author
|
Superseded: Tom is implementing structuredClone() natively with SpiderMonkey's structured clone, which avoids the cost of core-js's JS polyfill. An earlier native draft by Joseph Acernese (structuredClone.cc + builtin_modules/structured-clone.js) is a starting point. Separately, Paul is checking whether dcp-client's supervisor needs structuredClone() at all. Closing this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
structuredClone()as a global, using core-js's polyfill, the same wayurl.jsanddom-exception.jsprovideURLandDOMException.dcp-client's supervisor calls
structuredClone()(origin access templates, error shapes). Without it,localExec()under PythonMonkey stops at the supervisor (dcp MR !3327).builtin_modules/structured-clone.js, loaded at import next tourlglobal.d.tsdeclarationtests/js/structured-clone.simple: arrays, Map, Date, Uint8Array, cycles, andDataCloneErrorfor functionsTested with
pmjson macOS arm64 against an installed 1.4.1 with the module overlaid;url.simple,test-atob-btoa.simpleandset-timeout.simplestill pass.🤖 Generated with Claude Code