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

Side by Side Diff: Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h

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
« no previous file with comments | « no previous file | Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp » ('j') | 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name); 71 PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name);
72 IDBTransactionCoordinator* transactionCoordinator() const { return m_transac tionCoordinator.get(); } 72 IDBTransactionCoordinator* transactionCoordinator() const { return m_transac tionCoordinator.get(); }
73 void transactionStarted(PassRefPtr<IDBTransactionBackendInterface>); 73 void transactionStarted(PassRefPtr<IDBTransactionBackendInterface>);
74 void transactionFinished(PassRefPtr<IDBTransactionBackendInterface>); 74 void transactionFinished(PassRefPtr<IDBTransactionBackendInterface>);
75 75
76 private: 76 private:
77 IDBDatabaseBackendImpl(const String& name, IDBBackingStore* database, IDBTra nsactionCoordinator*, IDBFactoryBackendImpl*, const String& uniqueIdentifier); 77 IDBDatabaseBackendImpl(const String& name, IDBBackingStore* database, IDBTra nsactionCoordinator*, IDBFactoryBackendImpl*, const String& uniqueIdentifier);
78 78
79 bool openInternal(); 79 bool openInternal();
80 void loadObjectStores(); 80 void loadObjectStores();
81 int32_t connectionCount();
81 void processPendingCalls(); 82 void processPendingCalls();
82 83
83 static void createObjectStoreInternal(ScriptExecutionContext*, PassRefPtr<ID BDatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBTran sactionBackendInterface>); 84 static void createObjectStoreInternal(ScriptExecutionContext*, PassRefPtr<ID BDatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBTran sactionBackendInterface>);
84 static void deleteObjectStoreInternal(ScriptExecutionContext*, PassRefPtr<ID BDatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBTran sactionBackendInterface>); 85 static void deleteObjectStoreInternal(ScriptExecutionContext*, PassRefPtr<ID BDatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBTran sactionBackendInterface>);
85 static void setVersionInternal(ScriptExecutionContext*, PassRefPtr<IDBDataba seBackendImpl>, const String& version, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBT ransactionBackendInterface>); 86 static void setVersionInternal(ScriptExecutionContext*, PassRefPtr<IDBDataba seBackendImpl>, const String& version, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBT ransactionBackendInterface>);
86 87
87 // These are used as setVersion transaction abort tasks. 88 // These are used as setVersion transaction abort tasks.
88 static void removeObjectStoreFromMap(ScriptExecutionContext*, PassRefPtr<IDB DatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>); 89 static void removeObjectStoreFromMap(ScriptExecutionContext*, PassRefPtr<IDB DatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>);
89 static void addObjectStoreToMap(ScriptExecutionContext*, PassRefPtr<IDBDatab aseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>); 90 static void addObjectStoreToMap(ScriptExecutionContext*, PassRefPtr<IDBDatab aseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>);
90 static void resetVersion(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBack endImpl>, const String& version); 91 static void resetVersion(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBack endImpl>, const String& version);
(...skipping 18 matching lines...) Expand all
109 110
110 class PendingSetVersionCall; 111 class PendingSetVersionCall;
111 Deque<RefPtr<PendingSetVersionCall> > m_pendingSetVersionCalls; 112 Deque<RefPtr<PendingSetVersionCall> > m_pendingSetVersionCalls;
112 113
113 class PendingOpenCall; 114 class PendingOpenCall;
114 Deque<RefPtr<PendingOpenCall> > m_pendingOpenCalls; 115 Deque<RefPtr<PendingOpenCall> > m_pendingOpenCalls;
115 116
116 class PendingDeleteCall; 117 class PendingDeleteCall;
117 Deque<RefPtr<PendingDeleteCall> > m_pendingDeleteCalls; 118 Deque<RefPtr<PendingDeleteCall> > m_pendingDeleteCalls;
118 119
120 // FIXME: Eliminate the limbo state between openConnection() and registerFro ntendCallbacks()
121 // that this counter tracks.
122 int32_t m_pendingConnectionCount;
123
119 typedef ListHashSet<RefPtr<IDBDatabaseCallbacks> > DatabaseCallbacksSet; 124 typedef ListHashSet<RefPtr<IDBDatabaseCallbacks> > DatabaseCallbacksSet;
120 DatabaseCallbacksSet m_databaseCallbacksSet; 125 DatabaseCallbacksSet m_databaseCallbacksSet;
121 }; 126 };
122 127
123 } // namespace WebCore 128 } // namespace WebCore
124 129
125 #endif 130 #endif
126 131
127 #endif // IDBDatabaseBackendImpl_h 132 #endif // IDBDatabaseBackendImpl_h
OLDNEW
« no previous file with comments | « no previous file | Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698