summaryrefslogtreecommitdiffstats
path: root/WebCore/page
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-11-25 11:14:04 +0000
committerSteve Block <steveblock@google.com>2009-11-25 14:08:32 +0000
commit5b4f81709e8df8d953e2ad8496996fb0112b6186 (patch)
tree3f6fd423cd726cd1de2a199662b44333d66ebc4a /WebCore/page
parentc3d01e3597b510384b488d7d222e80a3876286b9 (diff)
downloadexternal_webkit-5b4f81709e8df8d953e2ad8496996fb0112b6186.zip
external_webkit-5b4f81709e8df8d953e2ad8496996fb0112b6186.tar.gz
external_webkit-5b4f81709e8df8d953e2ad8496996fb0112b6186.tar.bz2
Fixes use of statics of non-built-in types in Geolocation.
The Mac build requires that only built-in types are used as statics. Change-Id: I69a3f063c5728d76a13f73b8b056187d5678e0ab
Diffstat (limited to 'WebCore/page')
-rw-r--r--WebCore/page/Geolocation.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index 556d22c..e0352dd 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -178,7 +178,9 @@ class CachedPositionManager {
}
static void setDatabasePath(String databasePath)
{
- s_databaseFile = databasePath + databaseName;
+ if (!s_databaseFile)
+ s_databaseFile = new String;
+ *s_databaseFile = databasePath + databaseName;
// If we don't have have a cached position, attempt to read one from the
// DB at the new path.
if (s_instances && *s_cachedPosition == 0)
@@ -189,7 +191,7 @@ class CachedPositionManager {
static PassRefPtr<Geoposition> readFromDB()
{
SQLiteDatabase database;
- if (!database.open(s_databaseFile))
+ if (!s_databaseFile || !database.open(*s_databaseFile))
return 0;
// Create the table here, such that even if we've just created the
@@ -230,7 +232,7 @@ class CachedPositionManager {
ASSERT(position);
SQLiteDatabase database;
- if (!database.open(s_databaseFile))
+ if (!s_databaseFile || !database.open(*s_databaseFile))
return;
SQLiteTransaction transaction(database);
@@ -278,12 +280,12 @@ class CachedPositionManager {
}
static int s_instances;
static RefPtr<Geoposition>* s_cachedPosition;
- static String s_databaseFile;
+ static String* s_databaseFile;
};
int CachedPositionManager::s_instances = 0;
RefPtr<Geoposition>* CachedPositionManager::s_cachedPosition;
-String CachedPositionManager::s_databaseFile;
+String* CachedPositionManager::s_databaseFile = 0;
Geolocation::Geolocation(Frame* frame)