[Webkit-unassigned] [Bug 26993] New: Geolocation::requestPermission()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 6 09:11:52 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26993

           Summary: Geolocation::requestPermission()
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: yong.li at torchmobile.com
                CC: staikos at kde.org


See the following code:

void Geolocation::requestPermission()
{
    ......

    // Ask the chrome: it maintains the geolocation challenge policy itself.
    page->chrome()->requestGeolocationPermissionForFrame(m_frame, this);

    m_allowGeolocation = InProgress;
}

And the only case that requestPermission() is called:

void Geolocation::geolocationServicePositionChanged(GeolocationService*
service)
{
    ASSERT(service->lastPosition());

    requestPermission();
    if (!isAllowed())
        return;

    ......
}

This is weird. Whatever Chrome::requestGeolocationPermissionForFrame() does on
the Geolocation object, m_allowGeolocation is always InProgress. Unless it
calls setAllowed by a timer. So as the result, the first call to
geolocationServicePositionChanged must fail, and the subsequent calls can
succeed only after the ChromeClient calls setIsAllowed(true) by a timer.

Why not change it to:

    m_allowGeolocation = InProgress;
    page->chrome()->requestGeolocationPermissionForFrame(m_frame, this);

Is it any reason for it?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list