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

Side by Side Diff: Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.cpp

Issue 10630009: Merge 120828 - [Chromium] IndexedDB: Don't close database if pending connections are in flight (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 6 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
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 // FIXME: Everything from now on should be done on another thread. 176 // FIXME: Everything from now on should be done on another thread.
177 RefPtr<IDBBackingStore> backingStore = openBackingStore(securityOrigin, data Directory); 177 RefPtr<IDBBackingStore> backingStore = openBackingStore(securityOrigin, data Directory);
178 if (!backingStore) { 178 if (!backingStore) {
179 callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOW N_ERR, "Internal error.")); 179 callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOW N_ERR, "Internal error."));
180 return; 180 return;
181 } 181 }
182 182
183 RefPtr<IDBDatabaseBackendImpl> databaseBackend = IDBDatabaseBackendImpl::cre ate(name, backingStore.get(), m_transactionCoordinator.get(), this, uniqueIdenti fier); 183 RefPtr<IDBDatabaseBackendImpl> databaseBackend = IDBDatabaseBackendImpl::cre ate(name, backingStore.get(), m_transactionCoordinator.get(), this, uniqueIdenti fier);
184 if (databaseBackend) { 184 if (databaseBackend) {
185 callbacks->onSuccess(RefPtr<IDBDatabaseBackendInterface>(databaseBackend .get()).release());
186 m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get()); 185 m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
186 databaseBackend->openConnection(callbacks);
187 } else 187 } else
188 callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOW N_ERR, "Internal error.")); 188 callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOW N_ERR, "Internal error."));
189 } 189 }
190 190
191 } // namespace WebCore 191 } // namespace WebCore
192 192
193 #endif // ENABLE(INDEXED_DATABASE) 193 #endif // ENABLE(INDEXED_DATABASE)
OLDNEW
« no previous file with comments | « Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp ('k') | Source/WebCore/inspector/InspectorIndexedDBAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698