Closed Bug 1371080 Opened 7 years ago Closed 7 years ago

Use GetCurrentVirtualThread for XPCOM thread safety checks

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: billm, Assigned: billm)

Details

Attachments

(1 file)

This patch converts nsAutoOwningThread to use GetCurrentVirtualThread. I made the nsAutoOwningThread constructor out-of-line to avoid #including nsThreadUtils.h in nsISupportsImpl.h, but I think I could change it back if you want. I can't remember if there was a cycle in the header files or not. If there is, maybe we could move GetCurrentVirtualThread to its own header. I don't think that having it out-of-line is too bad since PR_GetCurrentThread is not super cheap itself.
Attached patch patchSplinter Review
Somehow I failed to attach the patch. See above comment.
Attachment #8876883 - Flags: review?(nfroyd)
Attachment #8876883 - Flags: review?(nfroyd) → review+
Pushed by wmccloskey@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/54b84edc0588
Use GetCurrentVirtualThread for XPCOM thread safety checks (r=froydnj)
https://hg.mozilla.org/mozilla-central/rev/54b84edc0588
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: