Closed Bug 1809752 Opened 1 year ago Closed 1 year ago

Assert if GetCurrentSerialEventTarget is called on a thread pool with no active TaskQueue

Categories

(Core :: XPCOM, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: nika, Assigned: nika)

References

Details

Attachments

(2 files)

This will help catch issues such as the one from bug 1806751, as we will assert earlier in the process. This also aligns better with the existing documentation of the method (which has been updated), which suggests that the method would assert if called on a thread pool.

This was always being tracked internlly to implement
nsThreadPool::IsOnCurrentThread, however this patch exposes the getter
publicly.

This will be used to assert if GetCurrentSerialEventTarget() is called from a
threadpool thread without a TaskQueue in the next part.

This will help catch issues such as the one from bug 1806751, as we will assert
earlier in the process. This also aligns better with the existing documentation
of the method (which has been updated), which suggests that the method would
assert if called on a thread pool.

Depends on D166603

Pushed by nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6d58c799cffe
Part 1: Allow querying the current nsThreadPool, r=mccr8
https://hg.mozilla.org/integration/autoland/rev/f0d9fcfaa6f8
Part 2: Assert if GetCurrentSerialEventTarget is called on a thread pool with no active TaskQueue, r=mccr8

Backed out for causing for causing perma failures in browser/components/firefoxview/tests/browser/browser_feature_callout_position.js

Backout link: https://hg.mozilla.org/integration/autoland/rev/0bbd4819fb46a437b424810a619a5d1c1cfa6905

Push with failures

Failure log

Flags: needinfo?(nika)
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/58e00c598375
Part 1: Allow querying the current nsThreadPool, r=mccr8
https://hg.mozilla.org/integration/autoland/rev/188ed220db1a
Part 2: Assert if GetCurrentSerialEventTarget is called on a thread pool with no active TaskQueue, r=mccr8

Relanded this because it was not the cause of those failures.

Flags: needinfo?(nika)
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: