Closed Bug 1805963 Opened 1 year ago Closed 1 year ago

Remove local execution support from nsThread

Categories

(Core :: XPCOM, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: nika, Assigned: nika)

Details

Attachments

(2 files)

The reason this was originally added was for bug 1516277 in order to allow a synchronous dispatch to a background thread to create a new PBackground instance without deadlocking. The dispatch didn't want to support running other main thread runnables, but needed to support sending the runnable to create a new PBackground instance on the main thread.

This is no longer an issue since bug 1737828, where we changed PBackground startup to no longer require the main thread, so we can remove the complexity.

The reason this was originally added was for bug 1516277 in order to allow a
synchronous dispatch to a background thread to create a new PBackground
instance without deadlocking. The dispatch didn't want to support running other
main thread runnables, but needed to support sending the runnable to create a
new PBackground instance on the main thread.

This is no longer an issue since bug 1737828, where we changed PBackground
startup to no longer require the main thread, so we can remove the complexity
and instead use a monitor to handle changes. This also allows removing the
timer, as the monitor's timeout can be used instead.

I also changed the logic slightly to make it more likely to catch an expecting
shutdown by waiting on the monitor with a timeout, as previously the main
thread would not be being woken up and checking the condition very often, due
to it not having any runnables to execute.

The only consumer of this feature has been removed, so we don't need it
anymore. It acts very differently than other runnables run on the main thread,
so removing it will simplify things.

Depends on D164840

Pushed by nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f627a5289831
Part 1: Stop using local execution mode for LSObject operations, r=janv
https://hg.mozilla.org/integration/autoland/rev/d70e48585724
Part 2: remove support for local execution, r=xpcom-reviewers,jstutte

Backed out 2 changesets (Bug 1805963) for causing mochitest failures on LSObject.cpp.
Backout link
Push with failures <--> 10
Failure Log
Also wpt5 Failure Log
Also 1 Failure Log
Also C Failure Log

Flags: needinfo?(nika)
Pushed by sstanca@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/432c20a7c837
Part 1: Stop using local execution mode for LSObject operations, r=janv
https://hg.mozilla.org/mozilla-central/rev/1e6cee37aa18
Part 2: remove support for local execution, r=xpcom-reviewers,jstutte
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Flags: needinfo?(nika)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: