Closed
Bug 806965
Opened 13 years ago
Closed 13 years ago
B2G Network Manager: navigator.onLine starts true even if false
Categories
(Firefox OS Graveyard :: General, defect, P3)
Firefox OS Graveyard
General
Tracking
(blocking-basecamp:+, firefox18 fixed)
People
(Reporter: ranbena, Assigned: mrbkap)
References
(Depends on 1 open bug)
Details
Attachments
(1 file)
2.47 KB,
patch
|
justin.lebar+bug
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
Steps to reproduce:
Once the device boots and connection is offline by default
Actual results:
navigator.onLine returns true
Expected results:
navigator.onLine returns false.
Only after connecting and disconnecting does the property return false as expected.
![]() |
Reporter | |
Updated•13 years ago
|
blocking-basecamp: --- → ?
![]() |
||
Updated•13 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
![]() |
||
Updated•13 years ago
|
blocking-basecamp: ? → +
Priority: -- → P3
![]() |
||
Comment 1•13 years ago
|
||
Does this impact WiFi connections for users or is it just the flag that is off?
![]() |
Reporter | |
Comment 2•13 years ago
|
||
Just a flag
![]() |
Reporter | |
Comment 3•13 years ago
|
||
It's critical though to Evme.
When Evme thinks it's connected but really isn't - neither results nor an appropriate message are displayed.
Component: Gaia → General
![]() |
||
Comment 4•13 years ago
|
||
Fixing this is also needed for FB integration. UX has advised to disable FB options is the user is not onLine.
![]() |
||
Updated•13 years ago
|
Assignee: nobody → mrbkap
![]() |
||
Comment 5•13 years ago
|
||
(In reply to Ran Ben Aharon (everything.me) from comment #2)
> Just a flag
This is exactly a flag but also a HTML5 feature. With navigator.onLine the web gains the status of network connection and then could do something specially if they knows they are at offline mode now.
Assignee | ||
Comment 6•13 years ago
|
||
Many thanks to Andrea for helping me look at this yesterday.
Assignee | ||
Comment 7•13 years ago
|
||
The actual fix here is pretty straightforward: nsIOService assumes that we're online until told otherwise. Bug 552829 added notifications to tell child processes that when the online/offline state changed, however didn't do anything to initialize the state on process startup.
There are two questions of taste to address though: is calling a Recv method directly poor form? I named the new state getter pretty generically. I could rename it to something more specific until we're sure we have to add other stuff to it.
Attachment #679803 -
Flags: review?(justin.lebar+bug)
Comment 8•13 years ago
|
||
Comment on attachment 679803 [details] [diff] [review]
Proposed fix
Written just for you: https://wiki.mozilla.org/B2G/Hacking#Git
Anyway, this seems fine to me. Maybe ask cjones if he's OK delegating the review to me? I don't have explicit review powers here.
Attachment #679803 -
Flags: review?(justin.lebar+bug) → review+
Assignee | ||
Comment 9•13 years ago
|
||
(I spoke to cjones and he was fine with jlebar reviewing here).
https://hg.mozilla.org/integration/mozilla-inbound/rev/efb2dca44965
Comment 10•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 11•13 years ago
|
||
status-firefox18:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•