Bug 980178 - Hold a strong ref to the WebGLContext in the task. - r=kamidphish

This commit is contained in:
Jeff Gilbert 2014-06-02 14:40:46 -07:00
parent 554c1772a5
commit 4d541b02e7

View File

@ -1183,7 +1183,7 @@ WebGLContext::TryToRestoreContext()
class UpdateContextLossStatusTask : public nsRunnable
{
WebGLContext* const mContext;
nsRefPtr<WebGLContext> mContext;
public:
UpdateContextLossStatusTask(WebGLContext* context)
@ -1232,6 +1232,7 @@ WebGLContext::UpdateContextLossStatus()
// check. If we're guilty, don't allow restores, though.
bool isGuilty = true;
MOZ_ASSERT(gl); // Shouldn't be missing gl if we're NotLost.
bool isContextLost = CheckContextLost(gl, &isGuilty);
if (isContextLost) {