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

Side by Side Diff: Source/WebCore/storage/IDBLevelDBBackingStore.cpp

Issue 7457026: Merge 91721 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/platform/leveldb/LevelDBDatabase.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 : m_identifier(identifier) 119 : m_identifier(identifier)
120 , m_factory(factory) 120 , m_factory(factory)
121 , m_db(db) 121 , m_db(db)
122 { 122 {
123 m_factory->addIDBBackingStore(identifier, this); 123 m_factory->addIDBBackingStore(identifier, this);
124 } 124 }
125 125
126 IDBLevelDBBackingStore::~IDBLevelDBBackingStore() 126 IDBLevelDBBackingStore::~IDBLevelDBBackingStore()
127 { 127 {
128 m_factory->removeIDBBackingStore(m_identifier); 128 m_factory->removeIDBBackingStore(m_identifier);
129
130 // m_db's destructor uses m_comparator. The order of destruction is importan t.
131 m_db.clear();
132 m_comparator.clear();
129 } 133 }
130 134
131 PassRefPtr<IDBBackingStore> IDBLevelDBBackingStore::open(SecurityOrigin* securit yOrigin, const String& pathBaseArg, int64_t maximumSize, const String& fileIdent ifier, IDBFactoryBackendImpl* factory) 135 PassRefPtr<IDBBackingStore> IDBLevelDBBackingStore::open(SecurityOrigin* securit yOrigin, const String& pathBaseArg, int64_t maximumSize, const String& fileIdent ifier, IDBFactoryBackendImpl* factory)
132 { 136 {
133 String pathBase = pathBaseArg; 137 String pathBase = pathBaseArg;
134 138
135 if (pathBase.isEmpty()) { 139 if (pathBase.isEmpty()) {
136 ASSERT_NOT_REACHED(); // FIXME: We need to handle this case for incognit o and DumpRenderTree. 140 ASSERT_NOT_REACHED(); // FIXME: We need to handle this case for incognit o and DumpRenderTree.
137 return PassRefPtr<IDBBackingStore>(); 141 return PassRefPtr<IDBBackingStore>();
138 } 142 }
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 // FIXME: this is checking for presence of the domain, not the database itse lf 1351 // FIXME: this is checking for presence of the domain, not the database itse lf
1348 return fileExists(path+"/CURRENT"); 1352 return fileExists(path+"/CURRENT");
1349 } 1353 }
1350 1354
1351 // FIXME: deleteDatabase should be part of IDBBackingStore. 1355 // FIXME: deleteDatabase should be part of IDBBackingStore.
1352 1356
1353 } // namespace WebCore 1357 } // namespace WebCore
1354 1358
1355 #endif // ENABLE(LEVELDB) 1359 #endif // ENABLE(LEVELDB)
1356 #endif // ENABLE(INDEXED_DATABASE) 1360 #endif // ENABLE(INDEXED_DATABASE)
OLDNEW
« no previous file with comments | « Source/WebCore/platform/leveldb/LevelDBDatabase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698