SharedWorker::Constructor needs to handle the system principal creating a SharedWorker in private browsing mode
Categories
(Core :: DOM: Workers, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: asuth, Assigned: asuth)
Details
Attachments
(1 file)
One of the side-effects of private-browsing mode[1] is that system-principal'ed windows will indicate they are in private browsing mode but the system principal itself can never have an mPrivateBrowsingId. This requires assertion checks like the one in SharedWorker::Constructor to handle this, and we need to accordingly update (or remove) this check.
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Currently we allow the System Principal to create SharedWorkers (and we
want to continue supporting this). In private browsing windows, however,
StorageAllowedForWindow returns ePrivateBrowsing and a
MOZ_DIAGNOSTIC_ASSERT origin-attribute check gets upset, effectively
breaking the use of SharedWorkers.
We address this by following our existing idiom for other storage-keyed
APIs where we special-case the system principal in our API logic and only
call StorageAllowedForWindow if we're not dealing with the system principal.
Because the SharedWorker::Constructor uses the StorageAccess value to
impact additional behavioral checks related to use of the partitioned
principal, we assign StorageAccess::eAllow in the system principal case.
Comment 3•3 years ago
|
||
bugherder |
Description
•