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

Side by Side Diff: Source/modules/webdatabase/DatabaseThread.h

Issue 469683002: Implement WebThreadSupportingGC, which wraps a WebThread attached to Oilpan's GC (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | Source/modules/webdatabase/DatabaseThread.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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple 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 10 matching lines...) Expand all
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 #ifndef DatabaseThread_h 28 #ifndef DatabaseThread_h
29 #define DatabaseThread_h 29 #define DatabaseThread_h
30 30
31 #include "platform/WebThreadSupportingGC.h"
31 #include "platform/heap/Handle.h" 32 #include "platform/heap/Handle.h"
32 #include "public/platform/WebThread.h"
33 #include "wtf/Deque.h" 33 #include "wtf/Deque.h"
34 #include "wtf/HashMap.h" 34 #include "wtf/HashMap.h"
35 #include "wtf/HashSet.h" 35 #include "wtf/HashSet.h"
36 #include "wtf/OwnPtr.h" 36 #include "wtf/OwnPtr.h"
37 #include "wtf/PassOwnPtr.h" 37 #include "wtf/PassOwnPtr.h"
38 #include "wtf/PassRefPtr.h" 38 #include "wtf/PassRefPtr.h"
39 #include "wtf/RefPtr.h" 39 #include "wtf/RefPtr.h"
40 #include "wtf/ThreadSafeRefCounted.h" 40 #include "wtf/ThreadSafeRefCounted.h"
41 #include "wtf/ThreadingPrimitives.h" 41 #include "wtf/ThreadingPrimitives.h"
42 42
(...skipping 29 matching lines...) Expand all
72 SQLTransactionClient* transactionClient() { return m_transactionClient.get() ; } 72 SQLTransactionClient* transactionClient() { return m_transactionClient.get() ; }
73 SQLTransactionCoordinator* transactionCoordinator() { return m_transactionCo ordinator.get(); } 73 SQLTransactionCoordinator* transactionCoordinator() { return m_transactionCo ordinator.get(); }
74 74
75 private: 75 private:
76 DatabaseThread(); 76 DatabaseThread();
77 77
78 void setupDatabaseThread(); 78 void setupDatabaseThread();
79 void cleanupDatabaseThread(); 79 void cleanupDatabaseThread();
80 void cleanupDatabaseThreadCompleted(); 80 void cleanupDatabaseThreadCompleted();
81 81
82 OwnPtr<WebThread> m_thread; 82 OwnPtr<WebThreadSupportingGC> m_thread;
83 83
84 // This set keeps track of the open databases that have been used on this th read. 84 // This set keeps track of the open databases that have been used on this th read.
85 // This must be updated in the database thread though it is constructed and 85 // This must be updated in the database thread though it is constructed and
86 // destructed in the context thread. 86 // destructed in the context thread.
87 WillBeHeapHashSet<RefPtrWillBeMember<DatabaseBackend> > m_openDatabaseSet; 87 WillBeHeapHashSet<RefPtrWillBeMember<DatabaseBackend> > m_openDatabaseSet;
88 88
89 OwnPtr<SQLTransactionClient> m_transactionClient; 89 OwnPtr<SQLTransactionClient> m_transactionClient;
90 OwnPtrWillBeMember<SQLTransactionCoordinator> m_transactionCoordinator; 90 OwnPtrWillBeMember<SQLTransactionCoordinator> m_transactionCoordinator;
91 TaskSynchronizer* m_cleanupSync; 91 TaskSynchronizer* m_cleanupSync;
92 92
93 mutable Mutex m_terminationRequestedMutex; 93 mutable Mutex m_terminationRequestedMutex;
94 bool m_terminationRequested; 94 bool m_terminationRequested;
95 OwnPtr<PendingGCRunner> m_pendingGCRunner;
96 OwnPtr<MessageLoopInterruptor> m_messageLoopInterruptor;
97 }; 95 };
98 96
99 } // namespace blink 97 } // namespace blink
100 98
101 #endif // DatabaseThread_h 99 #endif // DatabaseThread_h
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | Source/modules/webdatabase/DatabaseThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698