Geolocation provider not turned off when navigating away from site

RESOLVED FIXED

Status

()

Core
Geolocation
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: mwu, Assigned: dougt)

Tracking

unspecified
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(fennec2.0b1+)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

7 years ago
Going to a page that uses geolocation turns on geolocation, but leaving it doesn't turn it off. Might be Android only.
(Assignee)

Comment 1

7 years ago
Can you check to see if the android geolocation provider is getting it's StopDevice called?
(Assignee)

Comment 2

7 years ago
it isn't.

i think in the content process we aren't setting a disconnect timer.  patch soon.
(Assignee)

Comment 3

7 years ago
Created attachment 478559 [details] [diff] [review]
patch v.1

mwu, can you try?
Assignee: nobody → doug.turner
(Reporter)

Comment 4

7 years ago
(In reply to comment #3)
> Created attachment 478559 [details] [diff] [review]
> patch v.1
> 
> mwu, can you try?

Tried it. Still not stopping.
(Assignee)

Comment 5

7 years ago
Created attachment 478603 [details] [diff] [review]
patch v.1
Attachment #478559 - Attachment is obsolete: true
Attachment #478603 - Flags: review?(mwu)
(Assignee)

Updated

7 years ago
Attachment #478603 - Attachment is obsolete: true
Attachment #478603 - Flags: review?(mwu)
(Assignee)

Comment 6

7 years ago
Created attachment 478604 [details] [diff] [review]
patch v.1
Attachment #478604 - Flags: review?(josh)
Attachment #478604 - Flags: feedback?(mwu)
(Assignee)

Comment 7

7 years ago
mwu, can you give this a go?
(Reporter)

Comment 8

7 years ago
Comment on attachment 478604 [details] [diff] [review]
patch v.1

Looks ok to me. Switching between geolocation and non-geolocation using sites seems to work fine.
Attachment #478604 - Flags: feedback?(mwu) → feedback+

Comment 9

7 years ago
Comment on attachment 478604 [details] [diff] [review]
patch v.1

>-static PRBool sGeoIgnoreLocationFilter = PR_FALSE;
>+static PRBool sGeoIgnoreLocationFilter = PR_TRUE;

Unrelated change.

>+  for (PRUint32 i = 0; i <mProviders.Count(); i++) {

Space after <

>+    obs->NotifyObservers(mProviders[i],
>+			 "geolocation-device-events",
>+			 NS_LITERAL_STRING("starting").get());

Line up the parameters with the first line.

>+    obs->NotifyObservers(mProviders[i],
>+			 "geolocation-device-events",
>+			 NS_LITERAL_STRING("shutdown").get());

Same as above.

>+  for (PRUint32 i = 0; i< mWatchingCallbacks.Length(); i++)

Space before <, and brace the loop body.

>   mWatchingCallbacks[aWatchId]->MarkCleared();
>+

Crush all extraneous whitespace changes.

Looks good. r=me
Attachment #478604 - Flags: review?(josh) → review+
(Reporter)

Comment 10

7 years ago
Requesting blocking since this can cause unnecessary battery usage and we have a patch.
tracking-fennec: --- → ?

Updated

7 years ago
tracking-fennec: ? → 2.0b1+
(Assignee)

Comment 11

7 years ago
http://hg.mozilla.org/mozilla-central/rev/faf497893b28
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Backed out because this makes windows xpcshell assert and crash.

http://hg.mozilla.org/mozilla-central/pushloghtml?changeset=b75b24a337b3
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 13

7 years ago
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1285639466.1285641365.16238.gz&fulltext=1
(Assignee)

Comment 14

7 years ago
This patch added a new test case (test_geolocation_provider.js) which powers up the wifi scanning code.  It looks like the code does have a bug in it on windows.  Tests ftw!  :)
(Assignee)

Comment 15

7 years ago
push a possible fix to try...
(Assignee)

Comment 16

7 years ago
the fix for the orange is in bug 600110.
Depends on: 600235
(Assignee)

Comment 17

7 years ago
http://hg.mozilla.org/mozilla-central/rev/59f911418d49
Status: REOPENED → RESOLVED
Last Resolved: 7 years ago7 years ago
Resolution: --- → FIXED
Depends on: 604158
You need to log in before you can comment on or make changes to this bug.