Files
magpie/internal/gui
yetone a3900e46f1 pages: a read the sandbox shuts out, or an extension's error, no longer breaks a plugin page (onducoder on X)
onducoder opened Day card in magpie web (0.1.3702) and got "This page
stopped working" with "Failed to read a named property 'origin' from
'Location': Blocked a frame with origin "null" ..." logged as
plugin-day-card.open. magpie and Day card's files never read a window's
location; the error came out of a script in the frame (an extension's
inpage script, or a library probing parent/top) and pagebridge.js
reported every error and rejection in the frame as the page's own.

pagebridge.js now lets go of two kinds: an error whose stack or file
names chrome-/moz-/safari-web-extension://, and a SecurityError of the
"Blocked a frame with origin" (Chromium) / "Sandbox access violation"
(WebKit) kind. The page's own errors still break it.

Not confirmed: the reporter gave no stack, so the extension cause is an
inference; Day card's page (0.2.1) opened, with every background tile
clicked, raises nothing in Chromium. WebKit gives a sandboxed page's
uncaught error only as a bare "Script error." with no error object, so
there only rejections can be told apart.

Run (wsl-run, magpie-desktop): new plugin-page-foreign-error.test.cjs in
chromium and webkit, 3 of 3 green; red on the old pagebridge.js in both
(the exact `parent.location.origin` read, uncaught and as a rejection,
and extension stacks). plugin-page, plugin-page-idle: green. Not tried:
a real extension, Go tests (internal/gui needs webkitgtk on that box),
darwin/windows vet (JS-only change). menu-scroll.test.cjs is 0 of 24
there with the old bridge too, so not from this change; not filed here.
2026-11-11 15:40:36 +08:00
..
…
…