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

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

Issue 178103007: Revert of DatabaseBackend objects should be destructed in the originator thread (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « no previous file | Source/modules/webdatabase/DatabaseThread.h » ('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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/modules/webdatabase/DatabaseThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698