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
This commit is contained in:
JerryShih 2017-06-06 19:18:40 +08:00
Родитель ef71dedff2
Коммит 3c7cfd03af
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "RenderTextureHost.h"
#include "RenderThread.h"
namespace mozilla {
namespace wr {
@ -15,6 +16,7 @@ RenderTextureHost::RenderTextureHost()
RenderTextureHost::~RenderTextureHost()
{
MOZ_ASSERT(RenderThread::IsInRenderThread());
MOZ_COUNT_DTOR(RenderTextureHost);
}