Closed
Bug 894356
Opened 12 years ago
Closed 12 years ago
[B2G][Helix][Bluetooth]BT in eng-mode only can search one device when there are many BT devices nearby
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Firefox OS Graveyard
Bluetooth
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: ouyangming1985, Assigned: jj.evelyn)
Details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; aff-kingsoft-ciba; .NET4.0C; .NET4.0E)
Steps to reproduce:
When we do the BT test in eng-mode, we open the BT and get the defaultAdapter,then begin to search the BT device. The code as following:
var requestres = defaultAdapter.startDiscovery();
defaultAdapter.ondevicefound = function get_result(evt)
{
var device = evt.device;
document.write(device.address);
document.write("<br>");
}
Function ondevicefound will be called when found the BT device.
Actual results:
The function ondevicefound only be called once when there are many BT devices nearby. It means in eng-mode we can only search one BT device when there are many BT devices nearby.
Expected results:
The function ondevicefound should be called many times when there are many BT devices nearby.
Assignee: nobody → shuang
Dear Vincent,
Can you help to update test results on Helix?
Flags: needinfo?(vliu)
Confirmed with our member, this bug can be reproduced on Helix with eng-mode. Currently it does not look like gecko problem. So :ehung will help on it further for eng-mode.
Flags: needinfo?(vliu)
Assignee: shuang → ehung
| Assignee | ||
Comment 3•12 years ago
|
||
(In reply to ouyangming from comment #0)
> User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0;
> SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media
> Center PC 6.0; aff-kingsoft-ciba; .NET4.0C; .NET4.0E)
>
> Steps to reproduce:
>
> When we do the BT test in eng-mode, we open the BT and get the
> defaultAdapter,then begin to search the BT device. The code as following:
> var requestres = defaultAdapter.startDiscovery();
> defaultAdapter.ondevicefound = function get_result(evt)
> {
> var device = evt.device;
> document.write(device.address);
> document.write("<br>");
The root cause is simply because of the |document.write| here.
After document loaded, |document.write| will clear all DOM content, in fact, on Firefox, its behavior is more like creating a new page. So all JavaScript objects are cleared includes defaultAdapter. That's why after the first entry is written, it gets stuck.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•