From db217ef7ffee230d812f9da02a02d7d7bc696a8d Mon Sep 17 00:00:00 2001 From: Steve Block Date: Mon, 1 Feb 2010 12:36:08 +0000 Subject: [PATCH] Cherry-pick WebKit change 53708 for client-based Geolocation See http://trac.webkit.org/changeset/53708 This is required to bring Geolocation up-to-date with webkit.org to allow upstreaming of maximumAge code. Change-Id: I369d96f8af0fc060ca0c8a9c5a16c5cdf91bedd3 --- WebCore/ChangeLog | 12 ++++++++++++ WebCore/page/Geolocation.cpp | 3 +++ 2 files changed, 15 insertions(+) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 99241a4ff..b9bfc2522 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,15 @@ +2010-01-22 Steve Falkenburg + + Reviewed by Dan Bernstein. + + Crash in fast/dom/Window/window-properties if Geolocation enabled + https://bugs.webkit.org/show_bug.cgi?id=34013 + + Add null check to fix Geolocation crash in fast/dom/Window/window-properties. + + * page/Geolocation.cpp: + (WebCore::createGeoposition): + 2010-01-26 Steve Block Reviewed by Adam Barth. diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp index bc73bb519..ef3d43c95 100644 --- a/WebCore/page/Geolocation.cpp +++ b/WebCore/page/Geolocation.cpp @@ -52,6 +52,9 @@ static const char permissionDeniedErrorMessage[] = "User denied Geolocation"; static PassRefPtr createGeoposition(GeolocationPosition* position) { + if (!position) + return 0; + RefPtr coordinates = Coordinates::create(position->latitude(), position->longitude(), position->canProvideAltitude(), position->altitude(), position->accuracy(), position->canProvideAltitudeAccuracy(), position->altitudeAccuracy(), position->canProvideHeading(), position->heading(), position->canProvideSpeed(), position->speed()); -- 2.11.0