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

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

Issue 402433005: Oilpan: Remove support for tracing off-heap HashSets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix deadWrapper number in heap tests. Created 6 years, 5 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
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // the following clear(). Otherwise, WebThread destructor blocks the caller 55 // the following clear(). Otherwise, WebThread destructor blocks the caller
56 // thread, and causes a deadlock with ThreadState cleanup. 56 // thread, and causes a deadlock with ThreadState cleanup.
57 // DatabaseContext::stop() asks the database thread to close all of 57 // DatabaseContext::stop() asks the database thread to close all of
58 // databases, and wait until GC heap cleanup of the database thread. So we 58 // databases, and wait until GC heap cleanup of the database thread. So we
59 // can safely destruct WebThread here. 59 // can safely destruct WebThread here.
60 m_thread.clear(); 60 m_thread.clear();
61 } 61 }
62 62
63 void DatabaseThread::trace(Visitor* visitor) 63 void DatabaseThread::trace(Visitor* visitor)
64 { 64 {
65 #if ENABLE(OILPAN)
65 visitor->trace(m_openDatabaseSet); 66 visitor->trace(m_openDatabaseSet);
66 visitor->trace(m_transactionCoordinator); 67 visitor->trace(m_transactionCoordinator);
68 #endif
67 } 69 }
68 70
69 void DatabaseThread::start() 71 void DatabaseThread::start()
70 { 72 {
71 if (m_thread) 73 if (m_thread)
72 return; 74 return;
73 m_thread = adoptPtr(blink::Platform::current()->createThread("WebCore: Datab ase")); 75 m_thread = adoptPtr(blink::Platform::current()->createThread("WebCore: Datab ase"));
74 m_thread->postTask(new Task(WTF::bind(&DatabaseThread::setupDatabaseThread, this))); 76 m_thread->postTask(new Task(WTF::bind(&DatabaseThread::setupDatabaseThread, this)));
75 } 77 }
76 78
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 165
164 void DatabaseThread::scheduleTask(PassOwnPtr<DatabaseTask> task) 166 void DatabaseThread::scheduleTask(PassOwnPtr<DatabaseTask> task)
165 { 167 {
166 ASSERT(m_thread); 168 ASSERT(m_thread);
167 ASSERT(!task->hasSynchronizer() || task->hasCheckedForTermination()); 169 ASSERT(!task->hasSynchronizer() || task->hasCheckedForTermination());
168 // WebThread takes ownership of the task. 170 // WebThread takes ownership of the task.
169 m_thread->postTask(task.leakPtr()); 171 m_thread->postTask(task.leakPtr());
170 } 172 }
171 173
172 } // namespace WebCore 174 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/webdatabase/DatabaseContext.cpp ('k') | Source/modules/webdatabase/SQLTransactionCoordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698