Bug 79858

Summary: The way we invalidate high accuracy geolocation listener is incorrect
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: WebCore Misc.Assignee: Benjamin Poulain <benjamin>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, steveblock
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Description Benjamin Poulain 2012-02-28 19:11:05 PST
Add a high accuracy
Add a non-high accuracy
Remove the high accuracy
-->we stay in high accuracy

The problem is we have one client for all the controller, and the controller assume its client manage setEnableHighAccuracy per controller:

void GeolocationController::removeObserver(Geolocation* observer)
{
    if (!m_observers.contains(observer))
        return;

    m_observers.remove(observer);
    m_highAccuracyObservers.remove(observer);

    if (m_client) {
        if (m_observers.isEmpty())
            m_client->stopUpdating();
        else if (m_highAccuracyObservers.isEmpty())
            m_client->setEnableHighAccuracy(false);
    }
}
Comment 1 Benjamin Poulain 2012-02-29 11:50:36 PST
<rdar://problem/10951749>
Comment 2 Steve Block 2012-05-21 10:13:59 PDT
> The problem is we have one client for all the controller, and the controller
> assume its client manage setEnableHighAccuracy per controller:
Do you mean that you're sharing a single implementation of GeolocationClient between all GeolocationController instances? That would be a port-specific bug. Is this on Mac?
Comment 3 Steve Block 2012-05-21 10:24:03 PDT
Having re-read this bug, I think you're referring to the problem in Bug 41341 ?
Comment 4 Benjamin Poulain 2012-05-21 12:08:47 PDT
Yep. I close this bug as duplicate.

*** This bug has been marked as a duplicate of bug 41341 ***