[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:13:11 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit f9573cb7a0d72d772d98ec6122e2f3430120cb6b
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