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

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

Issue 201623003: Rollback transactions by observing them weakly from DatabaseSync. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « no previous file | Source/modules/webdatabase/DatabaseSync.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/DatabaseSync.h
diff --git a/Source/modules/webdatabase/DatabaseSync.h b/Source/modules/webdatabase/DatabaseSync.h
index 07052c87ae1daa2a5dbb7253d9e1296b343fe0f2..5304d74c1384a4d6e7d050e341b596902be62bd9 100644
--- a/Source/modules/webdatabase/DatabaseSync.h
+++ b/Source/modules/webdatabase/DatabaseSync.h
@@ -76,12 +76,30 @@ private:
static PassRefPtrWillBeRawPtr<DatabaseSync> create(ExecutionContext*, PassRefPtrWillBeRawPtr<DatabaseBackendBase>);
void runTransaction(PassOwnPtr<SQLTransactionSyncCallback>, bool readOnly, ExceptionState&);
- void rollbackTransaction(PassRefPtr<SQLTransactionSync>);
+ void rollbackTransaction(SQLTransactionSync&);
String m_lastErrorMessage;
friend class DatabaseManager;
friend class DatabaseServer; // FIXME: remove this when the backend has been split out.
+
+#if ENABLE(OILPAN)
+public:
+ void registerTransaction(SQLTransactionSync*);
+
+private:
+ class TransactionObserver {
+ public:
+ TransactionObserver(SQLTransactionSync* sync) : m_sync(sync) { }
+ ~TransactionObserver();
zerny-chromium 2014/03/17 09:27:00 private:
+ SQLTransactionSync* m_sync;
+ };
+
+ typedef PersistentHeapHashMap<WeakMember<SQLTransactionSync>, OwnPtr<TransactionObserver> > ObserverMap;
+ GC_PLUGIN_IGNORE("http://crbug.com/353083")
+ ObserverMap m_observers;
+#endif
+
};
} // namespace WebCore
« no previous file with comments | « no previous file | Source/modules/webdatabase/DatabaseSync.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698