summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/ChangeLog12
-rw-r--r--WebCore/page/Geolocation.cpp3
2 files changed, 15 insertions, 0 deletions
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 99241a4..b9bfc25 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-22 Steve Falkenburg <sfalken@apple.com>
+
+ 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 <steveblock@google.com>
Reviewed by Adam Barth.
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index bc73bb5..ef3d43c 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -52,6 +52,9 @@ static const char permissionDeniedErrorMessage[] = "User denied Geolocation";
static PassRefPtr<Geoposition> createGeoposition(GeolocationPosition* position)
{
+ if (!position)
+ return 0;
+
RefPtr<Coordinates> 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());