Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index 6b9933a730fd22cc4c6eafaeb944969f4da90434..7fdb883a31dafaddd8e325a6200ce24dc30e6226 100644 |
--- a/content/renderer/render_thread_impl.cc |
+++ b/content/renderer/render_thread_impl.cc |
@@ -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(); |