[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:28:11 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 1c3fda92090f652714e5921f6e653b9559006025
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 6 02:46:05 2009 +0000
2009-11-05 Steve Block <steveblock at google.com>
Reviewed by Eric Seidel.
If the Geolocation service fails to start, invoke the error callback asynchronously.
https://bugs.webkit.org/show_bug.cgi?id=28276
All Geolocation callbacks must be invoked asynchronously.
See http://www.w3.org/TR/geolocation-API/#geolocation_interface
No new tests possible with current LayoutTestController.
* page/Geolocation.cpp:
(WebCore::Geolocation::getCurrentPosition): Modified. Asserts that startRequest returned a notifier.
(WebCore::Geolocation::watchPosition): Modified. Asserts that startRequest returned a notifier.
(WebCore::Geolocation::startRequest): Modified. If the Geolocation service fails to start, set a fatal error on the notifier.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5fcc5c0..d411a23 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2009-11-05 Steve Block <steveblock at google.com>
+
+ Reviewed by Eric Seidel.
+
+ If the Geolocation service fails to start, invoke the error callback asynchronously.
+ https://bugs.webkit.org/show_bug.cgi?id=28276
+
+ All Geolocation callbacks must be invoked asynchronously.
+ See http://www.w3.org/TR/geolocation-API/#geolocation_interface
+
+ No new tests possible with current LayoutTestController.
+
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::getCurrentPosition): Modified. Asserts that startRequest returned a notifier.
+ (WebCore::Geolocation::watchPosition): Modified. Asserts that startRequest returned a notifier.
+ (WebCore::Geolocation::startRequest): Modified. If the Geolocation service fails to start, set a fatal error on the notifier.
+
2009-11-05 Chris Jerdonek <chris.jerdonek at gmail.com>
Reviewed by Eric Seidel.
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index de4a9a1..9a8a59c 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -151,8 +151,7 @@ void Geolocation::disconnectFrame()
void Geolocation::getCurrentPosition(PassRefPtr<PositionCallback> successCallback, PassRefPtr<PositionErrorCallback> errorCallback, PassRefPtr<PositionOptions> options)
{
RefPtr<GeoNotifier> notifier = startRequest(successCallback, errorCallback, options);
- if (!notifier)
- return;
+ ASSERT(notifier);
m_oneShots.add(notifier);
}
@@ -160,8 +159,7 @@ void Geolocation::getCurrentPosition(PassRefPtr<PositionCallback> successCallbac
int Geolocation::watchPosition(PassRefPtr<PositionCallback> successCallback, PassRefPtr<PositionErrorCallback> errorCallback, PassRefPtr<PositionOptions> options)
{
RefPtr<GeoNotifier> notifier = startRequest(successCallback, errorCallback, options);
- if (!notifier)
- return 0;
+ ASSERT(notifier);
static int nextAvailableWatchId = 1;
// In case of overflow, make sure the ID remains positive, but reuse the ID values.
@@ -182,13 +180,8 @@ PassRefPtr<Geolocation::GeoNotifier> Geolocation::startRequest(PassRefPtr<Positi
else {
if (notifier->hasZeroTimeout() || m_service->startUpdating(notifier->m_options.get()))
notifier->startTimerIfNeeded();
- else {
- if (notifier->m_errorCallback) {
- RefPtr<PositionError> error = PositionError::create(PositionError::PERMISSION_DENIED, "Unable to Start");
- notifier->m_errorCallback->handleEvent(error.get());
- }
- return 0;
- }
+ else
+ notifier->setFatalError(PositionError::create(PositionError::UNKNOWN_ERROR, "Failed to start Geolocation service"));
}
return notifier.release();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list