OLD | NEW |
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 #endif | 75 #endif |
76 } | 76 } |
77 | 77 |
78 void DatabaseTask::run() | 78 void DatabaseTask::run() |
79 { | 79 { |
80 // Database tasks are meant to be used only once, so make sure this one hasn
't been performed before. | 80 // Database tasks are meant to be used only once, so make sure this one hasn
't been performed before. |
81 #if !LOG_DISABLED | 81 #if !LOG_DISABLED |
82 ASSERT(!m_complete); | 82 ASSERT(!m_complete); |
83 #endif | 83 #endif |
84 | 84 |
85 if (!m_synchronizer && !m_database->opened()) { | 85 if (!m_synchronizer && !m_database->databaseContext()->databaseThread()->isD
atabaseOpen(m_database.get())) { |
86 taskCancelled(); | 86 taskCancelled(); |
87 #if !LOG_DISABLED | 87 #if !LOG_DISABLED |
88 m_complete = true; | 88 m_complete = true; |
89 #endif | 89 #endif |
90 return; | 90 return; |
91 } | 91 } |
92 | 92 |
93 WTF_LOG(StorageAPI, "Performing %s %p\n", debugTaskName(), this); | 93 WTF_LOG(StorageAPI, "Performing %s %p\n", debugTaskName(), this); |
94 | 94 |
95 m_database->resetAuthorizer(); | 95 m_database->resetAuthorizer(); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 } | 205 } |
206 | 206 |
207 #if !LOG_DISABLED | 207 #if !LOG_DISABLED |
208 const char* DatabaseBackend::DatabaseTableNamesTask::debugTaskName() const | 208 const char* DatabaseBackend::DatabaseTableNamesTask::debugTaskName() const |
209 { | 209 { |
210 return "DatabaseTableNamesTask"; | 210 return "DatabaseTableNamesTask"; |
211 } | 211 } |
212 #endif | 212 #endif |
213 | 213 |
214 } // namespace WebCore | 214 } // namespace WebCore |
OLD | NEW |