Commit 2db58cf9 authored by nduca@chromium.org's avatar nduca@chromium.org

Call WebCompositor::shutdown only when we have called WebCompositor::initialize

TBR=piman@chromium.org

Review URL: http://codereview.chromium.org/8769018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112539 0039d316-1c4b-4281-b951-d872f2087c98
parent b2596e75
......@@ -193,6 +193,7 @@ void RenderThreadImpl::Init() {
hidden_widget_count_ = 0;
idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs;
idle_notifications_to_skip_ = 0;
compositor_initialized_ = false;
task_factory_.reset(new ScopedRunnableMethodFactory<RenderThreadImpl>(this));
appcache_dispatcher_.reset(new AppCacheDispatcher(Get()));
......@@ -246,7 +247,10 @@ RenderThreadImpl::~RenderThreadImpl() {
file_thread_->Stop();
#ifdef WEBCOMPOSITOR_HAS_INITIALIZE
WebKit::WebCompositor::shutdown();
if (compositor_initialized_) {
WebKit::WebCompositor::shutdown();
compositor_initialized_ = false;
}
#endif
if (compositor_thread_.get()) {
RemoveFilter(compositor_thread_->GetMessageFilter());
......@@ -446,6 +450,7 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
WebKit::WebCompositor::initialize(NULL);
#endif
}
compositor_initialized_ = true;
WebScriptController::enableV8SingleThreadMode();
......
......@@ -242,6 +242,7 @@ class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread,
// Map of registered v8 extensions. The key is the extension name.
std::set<std::string> v8_extensions_;
bool compositor_initialized_;
scoped_ptr<CompositorThread> compositor_thread_;
ObserverList<content::RenderProcessObserver> observers_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment