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

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

Issue 331793004: Delete ASSERT_DISABLED (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/platform/mac/BlockExceptions.mm » ('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, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 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 * 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void DatabaseThread::recordDatabaseOpen(DatabaseBackend* database) 140 void DatabaseThread::recordDatabaseOpen(DatabaseBackend* database)
141 { 141 {
142 ASSERT(isDatabaseThread()); 142 ASSERT(isDatabaseThread());
143 ASSERT(database); 143 ASSERT(database);
144 ASSERT(!m_openDatabaseSet.contains(database)); 144 ASSERT(!m_openDatabaseSet.contains(database));
145 m_openDatabaseSet.add(database); 145 m_openDatabaseSet.add(database);
146 } 146 }
147 147
148 void DatabaseThread::recordDatabaseClosed(DatabaseBackend* database) 148 void DatabaseThread::recordDatabaseClosed(DatabaseBackend* database)
149 { 149 {
150 #ifndef ASSERT_DISABLED
151 MutexLocker lock(m_terminationRequestedMutex);
haraken 2014/06/13 06:33:55 I agree that this ASSERT is currently compiled out
152 #endif
153 ASSERT(isDatabaseThread()); 150 ASSERT(isDatabaseThread());
154 ASSERT(database); 151 ASSERT(database);
155 ASSERT(m_terminationRequested || m_openDatabaseSet.contains(database)); 152 ASSERT(m_terminationRequested || m_openDatabaseSet.contains(database));
156 m_openDatabaseSet.remove(database); 153 m_openDatabaseSet.remove(database);
157 } 154 }
158 155
159 bool DatabaseThread::isDatabaseOpen(DatabaseBackend* database) 156 bool DatabaseThread::isDatabaseOpen(DatabaseBackend* database)
160 { 157 {
161 ASSERT(isDatabaseThread()); 158 ASSERT(isDatabaseThread());
162 ASSERT(database); 159 ASSERT(database);
163 MutexLocker lock(m_terminationRequestedMutex); 160 MutexLocker lock(m_terminationRequestedMutex);
164 return !m_terminationRequested && m_openDatabaseSet.contains(database); 161 return !m_terminationRequested && m_openDatabaseSet.contains(database);
165 } 162 }
166 163
167 void DatabaseThread::scheduleTask(PassOwnPtr<DatabaseTask> task) 164 void DatabaseThread::scheduleTask(PassOwnPtr<DatabaseTask> task)
168 { 165 {
169 ASSERT(m_thread); 166 ASSERT(m_thread);
170 ASSERT(!task->hasSynchronizer() || task->hasCheckedForTermination()); 167 ASSERT(!task->hasSynchronizer() || task->hasCheckedForTermination());
171 // WebThread takes ownership of the task. 168 // WebThread takes ownership of the task.
172 m_thread->postTask(task.leakPtr()); 169 m_thread->postTask(task.leakPtr());
173 } 170 }
174 171
175 } // namespace WebCore 172 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/platform/mac/BlockExceptions.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698