Commit d531003d authored by jamesr@chromium.org's avatar jamesr@chromium.org

Null out context_factory in window_tree_host on shutdown

A context factory is specific to a particular native viewport so we
shouldn't leak it between different WindowTreeHostImpl instances. This
fixes some crashes in mojo_view_manager_unittests.

R=sky@chromium.org

Review URL: https://codereview.chromium.org/494883002

Cr-Commit-Position: refs/heads/master@{#291196}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291196 0039d316-1c4b-4281-b951-d872f2087c98
parent 2b66232b
......@@ -89,6 +89,8 @@ WindowTreeHostImpl::WindowTreeHostImpl(
WindowTreeHostImpl::~WindowTreeHostImpl() {
DestroyCompositor();
DestroyDispatcher();
delete context_factory_;
context_factory_ = NULL;
}
////////////////////////////////////////////////////////////////////////////////
......@@ -159,7 +161,6 @@ ui::EventProcessor* WindowTreeHostImpl::GetEventProcessor() {
// WindowTreeHostImpl, NativeViewportClient implementation:
void WindowTreeHostImpl::OnCreated(uint64_t native_viewport_id) {
LOG(ERROR) << "OnCreated " << native_viewport_id;
CommandBufferPtr cb;
gpu_service_->CreateOnscreenGLES2Context(
native_viewport_id, Size::From(bounds_.size()), Get(&cb));
......
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