Bug 1366502 - Make sure the RenderTextureHost is released in render thread. r=sotaro.
☠☠ backed out by b6e861dcd4c2 ☠ ☠
authorJerryShih <hshih@mozilla.com>
Tue, 06 Jun 2017 19:18:40 +0800
changeset 410683 cf598918bb1b06c2e7f2b7a268d31f3188a6174b
parent 410682 e2f21ee861e547bb6805f3ec51d24929913646f1
child 410684 265e39153027942550b4b2769b57d0bf04bfdcbf
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro
bugs1366502
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1366502 - Make sure the RenderTextureHost is released in render thread. r=sotaro. The RenderTextureHost might calls some thread-specific functions(e.g. OpenGL calls) in ~RenderTextureHost(). Add a checking here to prevent this problem. MozReview-Commit-ID: 62QlavmXOig
gfx/webrender_bindings/RenderTextureHost.cpp
--- a/gfx/webrender_bindings/RenderTextureHost.cpp
+++ b/gfx/webrender_bindings/RenderTextureHost.cpp
@@ -1,22 +1,24 @@
 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "RenderTextureHost.h"
+#include "RenderThread.h"
 
 namespace mozilla {
 namespace wr {
 
 RenderTextureHost::RenderTextureHost()
 {
   MOZ_COUNT_CTOR(RenderTextureHost);
 }
 
 RenderTextureHost::~RenderTextureHost()
 {
+  MOZ_ASSERT(RenderThread::IsInRenderThread());
   MOZ_COUNT_DTOR(RenderTextureHost);
 }
 
 } // namespace wr
 } // namespace mozilla