Closed Bug 1769322 Opened 2 months ago Closed 1 month ago

Allow for the possibility of non-xpc globals in nsIGlobal::IsScriptForbidden

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: mgaudet, Assigned: mgaudet)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

nsIGlobalObject::isScriptForbidden assumes that unless you've got an interface implemented in JS, your global is an xpc global, and therefore will have RealmPrivate + Scriptability.

This is a problem for ShadowRealms, as we can end up with callbacks from inside the ShadowRealm, where before executing the callback we check "IsScriptForbidden()`, and the shadow realm global is currently defined as a WebIDL global (and unlike all the other WebIDL defined globals, I think, can appear on main thread).

I think the fix here is simply to teach this that not all globals can return this data.

Assignee: nobody → mgaudet
Status: NEW → ASSIGNED
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/018450d728de
Allow for the possibility of non-xpc globals in nsIGlobal::IsScriptForbidden r=smaug
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.