-
hans@chromium.org authored
https://bugs.webkit.org/show_bug.cgi?id=68903 Reviewed by Steve Block. Source/WebCore: Add LevelDBDatabase::openInMemory() which uses leveldb::NewMemEnv() to create in-memory LevelDB databases. Use this in IDBLeveLDBBackingStore::open() when the caller passes in an empty file path. This happens in Chromium's incognito mode, and when running layout tests. Fix IDBSQLiteBackingStore::backingStoreExists() so it doesn't create files when passed in an empty file path, but uses the in-memory mode instead. Existing layout tests will all be run in-memory. * platform/leveldb/LevelDBDatabase.cpp: (WebCore::LevelDBDatabase::~LevelDBDatabase): (WebCore::openDB): (WebCore::LevelDBDatabase::open): (WebCore::LevelDBDatabase::openInMemory): * platform/leveldb/LevelDBDatabase.h: * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::open): * storage/IDBSQLiteBackingStore.cpp: (WebCore::IDBSQLiteBackingStore::backingStoreExists): Source/WebKit/chromium: Don't fall back to SQLite or use a temporary dir for in-memory databases (Incognito and layout tests); LevelDB supports in-memory databases now. * public/WebIDBFactory.h: * src/WebIDBFactoryImpl.cpp: (WebKit::WebIDBFactoryImpl::getDatabaseNames): (WebKit::WebIDBFactoryImpl::open): Tools: Remove the temporary dir that was necessary before LevelDB supported in-memory databases. * DumpRenderTree/chromium/TestShell.cpp: (TestShell::TestShell): * DumpRenderTree/chromium/TestShell.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
e5187c36