Closed Bug 1283328 Opened 5 years ago Closed 5 years ago

Miscellaneous thread shutdown cleanups

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: khuey, Assigned: khuey)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
Between AsyncShutdown and unifying Task/Runnable there's some cruft sitting in the tree.
Attachment #8766582 - Flags: review?(nfroyd)
Comment on attachment 8766582 [details] [diff] [review]
Patch

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

r=me

::: dom/media/systemservices/CamerasChild.cpp
@@ +548,1 @@
>      RefPtr<ShutdownRunnable> runnable = new ShutdownRunnable(event);

Can you fix ShutdownRunnable to not do a bunch of extra refcounting by taking an already_AddRefed instead of a RefPtr?

::: dom/media/systemservices/CamerasUtils.cpp
@@ -13,5 @@
> -#include "nsIIPCBackgroundChildCreateCallback.h"
> -
> -namespace mozilla {
> -namespace camera {
> -

...
Attachment #8766582 - Flags: review?(nfroyd) → review+
(In reply to Nathan Froyd [:froydnj] from comment #1)
> Comment on attachment 8766582 [details] [diff] [review]
> Patch
> 
> Review of attachment 8766582 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> r=me
> 
> ::: dom/media/systemservices/CamerasChild.cpp
> @@ +548,1 @@
> >      RefPtr<ShutdownRunnable> runnable = new ShutdownRunnable(event);
> 
> Can you fix ShutdownRunnable to not do a bunch of extra refcounting by
> taking an already_AddRefed instead of a RefPtr?

Done.

> ::: dom/media/systemservices/CamerasUtils.cpp
> @@ -13,5 @@
> > -#include "nsIIPCBackgroundChildCreateCallback.h"
> > -
> > -namespace mozilla {
> > -namespace camera {
> > -
> 
> ...

I disemboweled this file in bug 1283327, I just didn't remove the .cpp until I could remove the header too in this bug.
Pushed by khuey@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/910670d0db65
Clean up some thread shutdown stuff and remove CameraUtils. r=froydnj
https://hg.mozilla.org/mozilla-central/rev/910670d0db65
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.