Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2977)

Unified Diff: Source/modules/webdatabase/DatabaseManager.h

Issue 567453002: Web SQL: Make sure DatabaseManager is used only in the main thread. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webdatabase/AbstractDatabaseServer.h ('k') | Source/modules/webdatabase/DatabaseManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/DatabaseManager.h
diff --git a/Source/modules/webdatabase/DatabaseManager.h b/Source/modules/webdatabase/DatabaseManager.h
index 1c456f63ec1da209cee20b0f1ad134b20c1ade1e..e5fe8bb4d4b7236bfcd218e4bcc5b94a8ce6c964 100644
--- a/Source/modules/webdatabase/DatabaseManager.h
+++ b/Source/modules/webdatabase/DatabaseManager.h
@@ -26,15 +26,13 @@
#ifndef DatabaseManager_h
#define DatabaseManager_h
-#include "modules/webdatabase/DatabaseBasicTypes.h"
#include "modules/webdatabase/DatabaseContext.h"
#include "modules/webdatabase/DatabaseError.h"
#include "platform/heap/Handle.h"
#include "wtf/Assertions.h"
+#include "wtf/Forward.h"
#include "wtf/HashMap.h"
#include "wtf/PassRefPtr.h"
-#include "wtf/ThreadingPrimitives.h"
-#include "wtf/text/WTFString.h"
namespace blink {
@@ -43,13 +41,10 @@ class Database;
class DatabaseBackendBase;
class DatabaseCallback;
class DatabaseContext;
-class TaskSynchronizer;
class ExceptionState;
class SecurityOrigin;
class ExecutionContext;
-typedef int ExceptionCode;
-
class DatabaseManager {
WTF_MAKE_NONCOPYABLE(DatabaseManager); WTF_MAKE_FAST_ALLOCATED;
public:
@@ -74,8 +69,6 @@ public:
String fullPathForDatabase(SecurityOrigin*, const String& name, bool createIfDoesNotExist = true);
- void closeDatabasesImmediately(const String& originIdentifier, const String& name);
-
private:
DatabaseManager();
~DatabaseManager();
@@ -95,21 +88,12 @@ private:
AbstractDatabaseServer* m_server;
- // FIXME: Only one DatabaseContext object can be created. We can remove the
- // following map, and don't need to worry about locking.
- // Access to the following fields require locking m_contextMapLock:
-#if ENABLE(OILPAN)
- // We can't use PersistentHeapHashMap because multiple threads update the map.
- typedef HashMap<ExecutionContext*, OwnPtr<Persistent<DatabaseContext> > > ContextMap;
-#else
- typedef HashMap<ExecutionContext*, RefPtr<DatabaseContext> > ContextMap;
-#endif
+ typedef WillBePersistentHeapHashMap<ExecutionContext*, RefPtrWillBeMember<DatabaseContext> > ContextMap;
ContextMap m_contextMap;
#if ENABLE(ASSERT)
int m_databaseContextRegisteredCount;
int m_databaseContextInstanceCount;
#endif
- Mutex m_contextMapLock;
};
} // namespace blink
« no previous file with comments | « Source/modules/webdatabase/AbstractDatabaseServer.h ('k') | Source/modules/webdatabase/DatabaseManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698