xpc::UnprivilegedJunkScope should assert NS_IsMainThread

RESOLVED INVALID

Status

()

Core
XPConnect
RESOLVED INVALID
2 years ago
2 years ago

People

(Reporter: bz, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox46 affected)

Details

Just in case someone screws up and uses it on a non-main thread.

Bobby, any reason not to do that?
It already calls XPCJSRuntime::Get(), which calls nsXPConnect::XPConnect(), which will crash when called off the main thread. I suppose a MOZ_RELEASE_ASSERT might be a little friendlier to people debugging it.
Happy to add an assertion there, sure. MOZ_ASSERT is probably good enough given comment 1.
Ah, if we already crash then we can just mark this invalid.  I wanted to make sure we didn't accidentally end up with code landing that called this from off-thread, but crashing would presumably make tests turn orange or something... ;)
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.