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

Side by Side Diff: third_party/WebKit/Source/modules/webdatabase/Database.h

Issue 1694893002: Avoid data race on Database::m_opened. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: avoid casts Created 4 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 | « no previous file | third_party/WebKit/Source/modules/webdatabase/Database.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) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 VoidCallback* successCallback); 74 VoidCallback* successCallback);
75 void transaction( 75 void transaction(
76 SQLTransactionCallback*, 76 SQLTransactionCallback*,
77 SQLTransactionErrorCallback*, 77 SQLTransactionErrorCallback*,
78 VoidCallback* successCallback); 78 VoidCallback* successCallback);
79 void readTransaction( 79 void readTransaction(
80 SQLTransactionCallback*, 80 SQLTransactionCallback*,
81 SQLTransactionErrorCallback*, 81 SQLTransactionErrorCallback*,
82 VoidCallback* successCallback); 82 VoidCallback* successCallback);
83 83
84 bool opened() const { return m_opened; } 84 bool opened();
85 bool isNew() const { return m_new; } 85 bool isNew() const { return m_new; }
86 86
87 SecurityOrigin* securityOrigin() const; 87 SecurityOrigin* securityOrigin() const;
88 String stringIdentifier() const; 88 String stringIdentifier() const;
89 String displayName() const; 89 String displayName() const;
90 unsigned long estimatedSize() const; 90 unsigned long estimatedSize() const;
91 String fileName() const; 91 String fileName() const;
92 SQLiteDatabase& sqliteDatabase() { return m_sqliteDatabase; } 92 SQLiteDatabase& sqliteDatabase() { return m_sqliteDatabase; }
93 93
94 unsigned long long maximumSize() const; 94 unsigned long long maximumSize() const;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 RefPtr<SecurityOrigin> m_databaseThreadSecurityOrigin; 154 RefPtr<SecurityOrigin> m_databaseThreadSecurityOrigin;
155 Member<DatabaseContext> m_databaseContext; // Associated with m_executionCon text. 155 Member<DatabaseContext> m_databaseContext; // Associated with m_executionCon text.
156 156
157 String m_name; 157 String m_name;
158 String m_expectedVersion; 158 String m_expectedVersion;
159 String m_displayName; 159 String m_displayName;
160 unsigned long m_estimatedSize; 160 unsigned long m_estimatedSize;
161 String m_filename; 161 String m_filename;
162 162
163 DatabaseGuid m_guid; 163 DatabaseGuid m_guid;
164 bool m_opened; 164 int m_opened;
165 bool m_new; 165 bool m_new;
166 166
167 SQLiteDatabase m_sqliteDatabase; 167 SQLiteDatabase m_sqliteDatabase;
168 168
169 Member<DatabaseAuthorizer> m_databaseAuthorizer; 169 Member<DatabaseAuthorizer> m_databaseAuthorizer;
170 170
171 HeapDeque<Member<SQLTransactionBackend>> m_transactionQueue; 171 HeapDeque<Member<SQLTransactionBackend>> m_transactionQueue;
172 Mutex m_transactionInProgressMutex; 172 Mutex m_transactionInProgressMutex;
173 bool m_transactionInProgress; 173 bool m_transactionInProgress;
174 bool m_isTransactionQueueEnabled; 174 bool m_isTransactionQueueEnabled;
175 175
176 friend class ChangeVersionWrapper; 176 friend class ChangeVersionWrapper;
177 friend class DatabaseManager; 177 friend class DatabaseManager;
178 friend class SQLStatementBackend; 178 friend class SQLStatementBackend;
179 friend class SQLTransaction; 179 friend class SQLTransaction;
180 friend class SQLTransactionBackend; 180 friend class SQLTransactionBackend;
181 }; 181 };
182 182
183 } // namespace blink 183 } // namespace blink
184 184
185 #endif // Database_h 185 #endif // Database_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webdatabase/Database.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698