Closed Bug 1383330 Opened 2 years ago Closed 2 years ago

Use current thread instead of main thread for ContentChild recursion check

Categories

(Core :: DOM: Content Processes, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: billm, Assigned: billm)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
A lot of the earlier Quantum DOM work had the goal of replacing usage of nsIThread with nsIEventTarget. That's because it's a bit difficult to reason about which thread you're getting when there are multiple "main" threads. However, there are a couple places where we actually need the nsThread. Checking the recursion count is one of those places, since there will be be different recursion counts for each cooperative thread.

This patch replaces some code that fetches the recursion count from NS_GetMainThread. The new code gets the recursion count from whichever thread is the current thread.
Attachment #8888992 - Flags: review?(erahm)
Comment on attachment 8888992 [details] [diff] [review]
patch

Review of attachment 8888992 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me, thanks for the thorough comment.
Attachment #8888992 - Flags: review?(erahm) → review+
Pushed by wmccloskey@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/74b6145a2873
Use current thread rather than main thread for ContentChild recursion check (r=erahm)
https://hg.mozilla.org/mozilla-central/rev/74b6145a2873
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.