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

Side by Side Diff: WebCore/storage/DatabaseTask.cpp

Issue 596028: Make the DatabaseTracker thread-safe. (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/
Patch Set: '' Created 10 years, 10 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 | « WebCore/storage/Database.cpp ('k') | WebCore/storage/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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // *** DatabaseCloseTask *** 110 // *** DatabaseCloseTask ***
111 // Closes the database. 111 // Closes the database.
112 112
113 DatabaseCloseTask::DatabaseCloseTask(Database* database, DatabaseTaskSynchronize r* synchronizer) 113 DatabaseCloseTask::DatabaseCloseTask(Database* database, DatabaseTaskSynchronize r* synchronizer)
114 : DatabaseTask(database, synchronizer) 114 : DatabaseTask(database, synchronizer)
115 { 115 {
116 } 116 }
117 117
118 void DatabaseCloseTask::doPerformTask() 118 void DatabaseCloseTask::doPerformTask()
119 { 119 {
120 database()->close(); 120 // Tell the database not to call back to the context thread; we'll handle it .
121 database()->close(false);
121 } 122 }
122 123
123 #ifndef NDEBUG 124 #ifndef NDEBUG
124 const char* DatabaseCloseTask::debugTaskName() const 125 const char* DatabaseCloseTask::debugTaskName() const
125 { 126 {
126 return "DatabaseCloseTask"; 127 return "DatabaseCloseTask";
127 } 128 }
128 #endif 129 #endif
129 130
130 // *** DatabaseTransactionTask *** 131 // *** DatabaseTransactionTask ***
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 #ifndef NDEBUG 175 #ifndef NDEBUG
175 const char* DatabaseTableNamesTask::debugTaskName() const 176 const char* DatabaseTableNamesTask::debugTaskName() const
176 { 177 {
177 return "DatabaseTableNamesTask"; 178 return "DatabaseTableNamesTask";
178 } 179 }
179 #endif 180 #endif
180 181
181 } // namespace WebCore 182 } // namespace WebCore
182 183
183 #endif 184 #endif
OLDNEW
« no previous file with comments | « WebCore/storage/Database.cpp ('k') | WebCore/storage/DatabaseThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698