Open Bug 1010439 Opened 7 years ago Updated 2 years ago

Stop passing around raw nsIPrincipal* pointers off-main-thread

Categories

(Core :: DOM: Core & HTML, defect, P5)

x86
macOS
defect

Tracking

()

People

(Reporter: bholley, Unassigned)

References

Details

See the discussion in bug 998002 comment 1.
Hi Bobby,

Could you clarify in a few words what is expected results in this bug?

As I understood we should apply reference counting to the nsIPrincipal/nsPrincipal pointers which used OMT but i'm not sure that i'm totally correct.
Flags: needinfo?(bobbyholley)
(In reply to Nick Lebedev [:nl] from comment #1)
> As I understood we should apply reference counting to the
> nsIPrincipal/nsPrincipal pointers which used OMT but i'm not sure that i'm
> totally correct.

Er, not quite. The issue is actually that we _shouldn't_ reference count the nsIPrincipals that are used OMT, because they're not threadsafe. Currently, the code is just very careful not to do that, but I think it would be clearer to pass around JSPrincipals (which are opaque pointers to nsIPrincipal) in those situations instead.

For what it's worth, this might be kind of tricky, so it's totally fine if you want to work on something else. ;-)
Flags: needinfo?(bobbyholley)
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.