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

Side by Side Diff: chrome/renderer/render_thread.cc

Issue 573044: Merge 37594 - Wait for the DB thread to finish posting tasks to the main thre... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/307/src/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/renderer/renderer_web_database_observer.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 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/render_thread.h" 5 #include "chrome/renderer/render_thread.h"
6 6
7 #include <v8.h> 7 #include <v8.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 AddFilter(db_message_filter_.get()); 203 AddFilter(db_message_filter_.get());
204 spellchecker_.reset(new SpellCheck()); 204 spellchecker_.reset(new SpellCheck());
205 205
206 #if defined(OS_POSIX) 206 #if defined(OS_POSIX)
207 suicide_on_channel_error_filter_ = new SuicideOnChannelErrorFilter; 207 suicide_on_channel_error_filter_ = new SuicideOnChannelErrorFilter;
208 AddFilter(suicide_on_channel_error_filter_.get()); 208 AddFilter(suicide_on_channel_error_filter_.get());
209 #endif 209 #endif
210 } 210 }
211 211
212 RenderThread::~RenderThread() { 212 RenderThread::~RenderThread() {
213 // Wait for all databases to be closed.
214 if (renderer_web_database_observer_.get())
215 renderer_web_database_observer_->WaitForAllDatabasesToClose();
216
213 // Shutdown in reverse of the initialization order. 217 // Shutdown in reverse of the initialization order.
214 RemoveFilter(devtools_agent_filter_.get()); 218 RemoveFilter(devtools_agent_filter_.get());
215 RemoveFilter(db_message_filter_.get()); 219 RemoveFilter(db_message_filter_.get());
216 db_message_filter_ = NULL; 220 db_message_filter_ = NULL;
221
217 if (webkit_client_.get()) 222 if (webkit_client_.get())
218 WebKit::shutdown(); 223 WebKit::shutdown();
219 224
220 lazy_tls.Pointer()->Set(NULL); 225 lazy_tls.Pointer()->Set(NULL);
221 226
222 // TODO(port) 227 // TODO(port)
223 #if defined(OS_WIN) 228 #if defined(OS_WIN)
224 // Clean up plugin channels before this thread goes away. 229 // Clean up plugin channels before this thread goes away.
225 PluginChannelBase::CleanupChannels(); 230 PluginChannelBase::CleanupChannels();
226 // Don't call COM if the renderer is in the sandbox. 231 // Don't call COM if the renderer is in the sandbox.
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 spellchecker_->EnableAutoSpellCorrect(auto_spell_correct); 739 spellchecker_->EnableAutoSpellCorrect(auto_spell_correct);
735 } 740 }
736 741
737 void RenderThread::OnSpellCheckWordAdded(const std::string& word) { 742 void RenderThread::OnSpellCheckWordAdded(const std::string& word) {
738 spellchecker_->WordAdded(word); 743 spellchecker_->WordAdded(word);
739 } 744 }
740 745
741 void RenderThread::OnSpellCheckEnableAutoSpellCorrect(bool enable) { 746 void RenderThread::OnSpellCheckEnableAutoSpellCorrect(bool enable) {
742 spellchecker_->EnableAutoSpellCorrect(enable); 747 spellchecker_->EnableAutoSpellCorrect(enable);
743 } 748 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/renderer_web_database_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698