[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:21:51 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 01ee115e223909b54d149ae6005791a31b826a24
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 28 19:23:38 2009 +0000
2009-10-28 Steve Block <steveblock at google.com>
Reviewed by Darin Adler.
Makes sure that Geolocation watch IDs remain positive on overflow.
https://bugs.webkit.org/show_bug.cgi?id=30122
No new tests possible.
* page/Geolocation.cpp: Modified.
(WebCore::Geolocation::watchPosition): Modified. Reset the watch ID to 1 on overflow.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7d3fbd6..4aaa6f4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2009-10-28 Steve Block <steveblock at google.com>
+
+ Reviewed by Darin Adler.
+
+ Makes sure that Geolocation watch IDs remain positive on overflow.
+ https://bugs.webkit.org/show_bug.cgi?id=30122
+
+ No new tests possible.
+
+ * page/Geolocation.cpp: Modified.
+ (WebCore::Geolocation::watchPosition): Modified. Reset the watch ID to 1 on overflow.
+
2009-10-28 George Staikos <george.staikos at torchmobile.com>
Attempt to fix the Mac debug build after 50225.
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index a265e7d..de4a9a1 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -164,6 +164,9 @@ int Geolocation::watchPosition(PassRefPtr<PositionCallback> successCallback, Pas
return 0;
static int nextAvailableWatchId = 1;
+ // In case of overflow, make sure the ID remains positive, but reuse the ID values.
+ if (nextAvailableWatchId < 1)
+ nextAvailableWatchId = 1;
m_watchers.set(nextAvailableWatchId, notifier.release());
return nextAvailableWatchId++;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list