diff options
author | Steve Block <steveblock@google.com> | 2010-02-19 12:09:33 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-19 13:07:13 +0000 |
commit | 032802d7bdd58f0165721ecf815eef6d3bfc0863 (patch) | |
tree | edfbe23cd3e55d69b20ef137529c08648ca7634d /WebCore/platform | |
parent | 23af5d15453c2ecc01e9233b8a2cf332e1d32d0b (diff) | |
download | external_webkit-032802d7bdd58f0165721ecf815eef6d3bfc0863.zip external_webkit-032802d7bdd58f0165721ecf815eef6d3bfc0863.tar.gz external_webkit-032802d7bdd58f0165721ecf815eef6d3bfc0863.tar.bz2 |
Fixes a crash in the Geolocation service when using maximumAge
When a browser page is put to the background, the Geolocation object is
suspended. If the Geolocation object has active requests, it suspends its
Geolocation service.
Now that we have maximum age support, the Geolocation object can have active
requests without having started its Geolocation service. In this case, the
geolocation service can ignore calls to suspend and resume.
This avoids a crash when the Android Geolocation service hasn't created it's
java bridge when suspend is called.
Bug: 2453611
Change-Id: I368226281920512584a92b5f1967d602df1f0782
Diffstat (limited to 'WebCore/platform')
-rw-r--r-- | WebCore/platform/android/GeolocationServiceAndroid.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/WebCore/platform/android/GeolocationServiceAndroid.cpp b/WebCore/platform/android/GeolocationServiceAndroid.cpp index aaa7af7..61043fb 100644 --- a/WebCore/platform/android/GeolocationServiceAndroid.cpp +++ b/WebCore/platform/android/GeolocationServiceAndroid.cpp @@ -115,14 +115,14 @@ void GeolocationServiceAndroid::stopUpdating() void GeolocationServiceAndroid::suspend() { - ASSERT(m_javaBridge); - m_javaBridge->stop(); + if (m_javaBridge) + m_javaBridge->stop(); } void GeolocationServiceAndroid::resume() { - ASSERT(m_javaBridge); - m_javaBridge->start(); + if (m_javaBridge) + m_javaBridge->start(); } // Note that there is no guarantee that subsequent calls to this method offer a |