Closed Bug 1037291 Opened 10 years ago Closed 10 years ago

Make BluetoothDiscoveryHandle expire when discovery is stopped

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S6 (18july)

People

(Reporter: ben.tian, Assigned: ben.tian)

References

Details

(Whiteboard: [webbt-api])

Attachments

(1 file, 1 obsolete file)

When adapter A gets a discovery handle from |startDiscovery|, prior discovery handles held by either adapter A or other adapters should expire and stop listening to "DeviceFound" bluetooth signal.
Assignee: nobody → btian
Whiteboard: [webbt-api]
Also reject promise of startDiscovery when discovery is already started, in order to inform applications to get a new discovery handle from another startDiscovery call.
Attachment #8454231 - Flags: review?(echou)
Comment on attachment 8454231 [details] [diff] [review]
Patch 1 (v1): Make BluetoothDiscoveryHandle expire when discovery is stopped

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

r=me with nit addressed.

::: dom/bluetooth2/BluetoothAdapter.cpp
@@ +400,5 @@
>  }
>  
> +void
> +BluetoothAdapter::SetDiscoveryHandleInUse(
> +  nsRefPtr<BluetoothDiscoveryHandle> aDiscoveryHandle)

nit: please do not pass a nsRefPtr as an argument since it's wasteful. 

https://developer.mozilla.org/en-US/docs/Using_nsCOMPtr/Getting_Started_Guide#nsCOMPtrs_in_function_signatures
Attachment #8454231 - Flags: review?(echou) → review+
Revise based on reviewer's comment.
Attachment #8454231 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c2ae38e66552
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S6 (18july)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: