[Webkit-unassigned] [Bug 38195] Bring CLIENT_BASED_GEOLOCATION more in line with non-client based: remove Geolocation::setPosition and use lastPosition()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 4 11:48:52 PDT 2010


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





--- Comment #7 from Marcus Bulach <bulach at chromium.org>  2010-05-04 11:48:52 PST ---
(In reply to comment #4)
> (From update of attachment 54413 [details])
> > - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
> > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> I think it's best to leave the whitespace changes out of this patch for
> clarity.
yep, reverted the ws changes.

> 
> > +    if (m_lastPosition.get())
> > +        return m_lastPosition.get();
> Is this caching required for correct behaviour or is it just an optimisation?
> GeolocationController::lastPosition() should only be called once the client has
> called GeolocationController::positionChanged(), and it seems that the client
> should always have a last position available by this time.

AFAICT GeolocationController::m_client is optional, which means we need to hold
on the position passed via the public method
GeolocationController::positionChanged(GeolocationPosition* position), that is,
this method may be called directly without a client.

I'm not entirely familiar with this part, so please, let me know if I'm wrong,
or who else could help taking a look at 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