Closed
Bug 1253159
Opened 9 years ago
Closed 9 years ago
Use request timer instead of depending on locationUpdatePending.
Categories
(Core :: DOM: Geolocation, defect)
Core
DOM: Geolocation
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: dougt, Assigned: dougt)
References
Details
(Whiteboard: btpp-active)
Attachments
(1 file)
(deleted),
patch
|
kanru
:
review+
|
Details | Diff | Splinter Review |
Fixing the test_timerRestartWatch mochitest for e10s.
Background:
Web content can pass geolocation a position option called timeout. This is the amount of time the system should try to get a position. See:
https://www.w3.org/TR/geolocation-API/#timeout
In the non-e10s case, the location provider calls nsIGeolocationProvider::locationUpdatePending which causes the geolocation system to reset it's handing of the above described timeout. This seems to work fine.
https://dxr.mozilla.org/mozilla-central/source/xpcom/system/nsIGeolocationProvider.idl#35
In the e10s case, the location provider and the geolocation system live in the parent process. The object that keeps track of the position options (and other things) lives in the child process:
https://dxr.mozilla.org/mozilla-central/source/dom/geolocation/nsGeolocation.cpp#77
Currently, we are not passing the 'locationUpdatePending' message from the parent down to the child process. This results in the nsGeolocationRequest not being able to keep track of its timeout state.
We added locationUpdatePending for QC to do some magic and override how request timeout works. This is just extra complicated.
What I think we should do is:
1) remove locationUpdatePending from nsIGeolocationProvider.
2) update all in-tree geolocation providers.
3) in nsGeolocationRequest, always reset the timer in Notify and SendLocation. This enables Watch() to get multiple timeout callbacks which is the behavior without e10s.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee: nobody → dougt
Attachment #8726071 -
Flags: review?(josh)
Assignee | ||
Comment 2•9 years ago
|
||
Updated•9 years ago
|
Whiteboard: btpp-active
Comment 3•9 years ago
|
||
(In reply to Doug Turner (:dougt) from comment #0)
> What I think we should do is:
>
> 1) remove locationUpdatePending from nsIGeolocationProvider.
>
> 2) update all in-tree geolocation providers.
>
> 3) in nsGeolocationRequest, always reset the timer in Notify and
> SendLocation. This enables Watch() to get multiple timeout callbacks which
> is the behavior without e10s.
3) does not exactly follow the spec. The spec says "the first timeout is relative to the moment watchPosition() was called [...] Subsequent timeouts are relative to the moment when [...] the position of the hosting device has changed"
That said, I think it's subtle and may not worth to implement.
Comment 4•9 years ago
|
||
Comment on attachment 8726071 [details] [diff] [review]
remove_locationUpdatePending
Review of attachment 8726071 [details] [diff] [review]:
-----------------------------------------------------------------
steal review.
in NetworkGeolocationProvider.js
495 this.notifyListener("locationUpdatePending");
should be deleted together.
Attachment #8726071 -
Flags: review?(josh) → review+
Assignee | ||
Comment 5•9 years ago
|
||
> That said, I think it's subtle and may not worth to implement.
I think we've been broken since first implementation.
Keywords: checkin-needed
Keywords: checkin-needed
Comment 7•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•