Closed
Bug 1573623
Opened 5 years ago
Closed 5 years ago
Add support for callables to ClearOnShutdown
Categories
(Core :: XPCOM, task, P1)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla70
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: bugzilla, Assigned: bugzilla)
Details
Attachments
(1 file)
It would be nice to be able to use ClearOnShutdown
for more than just clearing smart pointers. This would allow us to avoid nsIObserver
boilerplate.
Assignee | ||
Comment 1•5 years ago
|
||
This patch adds an overload to ClearOnShutdown
that allows to the caller to
supply any callable. This would be nice so that we can do more than just clear
smart pointers without needing to write a bunch of observer service boilerplate.
We use std::function
to hold the callable.
Updated•5 years ago
|
Attachment #9085204 -
Attachment description: Bug 1573623: Add support for passing callables to ClearOnShutdown; r=froydnj! → Bug 1573623: Add RunOnShutdown, a variant of ClearOnShutdown which supports passing callables; r=froydnj!
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f510b32aec3a Add RunOnShutdown, a variant of ClearOnShutdown which supports passing callables; r=froydnj
Comment 3•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox70:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in
before you can comment on or make changes to this bug.
Description
•