Files
Calixte Denizet 8c49b3bc1e Bug 1968068 - Add an associatedWindow option to Cu.Sandbox. r=smaug
A sandbox created with a null principal and no sandboxPrototype cannot be
mapped to a DOM window, so the interrupt callback bails out and the scripts
running in it are never reported as slow ones.

Add an associatedWindow option: the window is held weakly on the SandboxPrivate
and is only read back by the interrupt callback, when the existing lookups
failed. It is never exposed to the code running in the sandbox, hence the
sandbox keeps its principal and still has no access to the window. It is
ignored for system-principal scripts, which must stay out of the user's reach.

Differential Revision: https://phabricator.services.mozilla.com/D321526
2026-08-26 18:25:54 +00:00
..