[b2g-bluetooth] Destroy BluetoothHfpManager instance while in shutdown

RESOLVED FIXED in mozilla18

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: gyeh, Assigned: gyeh)

Tracking

Trunk
mozilla18
ARM
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 4 obsolete attachments)

Comment hidden (empty)
(Assignee)

Comment 1

5 years ago
Follow up of Bug 791197
(Assignee)

Comment 2

5 years ago
Created attachment 666874 [details] [diff] [review]
v1 patch
Attachment #666874 - Flags: review?(kyle)
Comment on attachment 666874 [details] [diff] [review]
v1 patch

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

The fact that the diff isn't lining up worries me. Looks good otherwise, but would like to make sure the diff is what is expected before r+'ing. Re-r? after either fixing or telling me I'm crazy. :)

::: dom/bluetooth/BluetoothHfpManager.cpp
@@ +36,5 @@
> +
> +namespace {
> +
> +StaticRefPtr<BluetoothHfpManager> gBluetoothHfpManager;
> +

Nit: Don't need extra newlines between this and other statics.

@@ +106,5 @@
>    : mCurrentVgs(-1)
>    , mCurrentCallIndex(0)
>    , mCurrentCallState(nsIRadioInterfaceLayer::CALL_STATE_DISCONNECTED)
>  {
> +bool

So I think your diff may be off here. Splinter is showing Init() to be /in/ the constructor?

@@ +342,5 @@
> +{
> +  MOZ_ASSERT(NS_IsMainThread());
> +
> +  gInShutdown = true;
> +

Nit: We don't need all of these extra newlines.
Attachment #666874 - Flags: review?(kyle)
(Assignee)

Comment 4

5 years ago
Created attachment 666885 [details] [diff] [review]
v2 patch

Oops, you got me! I found it after attaching the patch :p
Attachment #666874 - Attachment is obsolete: true
Attachment #666885 - Flags: review?(kyle)
(Assignee)

Comment 5

5 years ago
Created attachment 666891 [details] [diff] [review]
v2 patch

register NS_XPCOM_SHUTDOWN_OBSERVER_ID in Init()
Attachment #666885 - Attachment is obsolete: true
Attachment #666885 - Flags: review?(kyle)
Attachment #666891 - Flags: review?(kyle)
(Assignee)

Comment 6

5 years ago
Created attachment 666894 [details] [diff] [review]
v2 patch

remove observers of mozsettings-changed in Cleanup()
Attachment #666891 - Attachment is obsolete: true
Attachment #666891 - Flags: review?(kyle)
Attachment #666894 - Flags: review?(kyle)
(Assignee)

Comment 7

5 years ago
Created attachment 667298 [details] [diff] [review]
Final version, r=qdot

try server: https://tbpl.mozilla.org/?tree=Try&rev=7fc431b62908
Attachment #666894 - Attachment is obsolete: true

Comment 9

5 years ago
https://hg.mozilla.org/mozilla-central/rev/fd238b14ba35
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Duplicate of this bug: 794346
You need to log in before you can comment on or make changes to this bug.