Commit cddc249b authored by jchen10's avatar jchen10 Committed by Commit Bot

Fix the clearProgramCompletionQueries crash

It seems that ContextGL() might be null in the destructor of
WebGLRenderingContextBase.

Bug: 962800
Change-Id: I3aa3a5b25bf85ba9a97b2e1fc007c57cf33ec82c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610893Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Reviewed-by: default avatarKai Ninomiya <kainino@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Cr-Commit-Position: refs/heads/master@{#661160}
parent 76eacdb5
...@@ -1308,8 +1308,6 @@ WebGLRenderingContextBase::~WebGLRenderingContextBase() { ...@@ -1308,8 +1308,6 @@ WebGLRenderingContextBase::~WebGLRenderingContextBase() {
// context state. // context state.
destruction_in_progress_ = true; destruction_in_progress_ = true;
clearProgramCompletionQueries();
// Now that the context and context group no longer hold on to the // Now that the context and context group no longer hold on to the
// objects they create, and now that the objects are eagerly finalized // objects they create, and now that the objects are eagerly finalized
// rather than the context, there is very little useful work that this // rather than the context, there is very little useful work that this
...@@ -1332,6 +1330,8 @@ void WebGLRenderingContextBase::DestroyContext() { ...@@ -1332,6 +1330,8 @@ void WebGLRenderingContextBase::DestroyContext() {
if (!GetDrawingBuffer()) if (!GetDrawingBuffer())
return; return;
clearProgramCompletionQueries();
extensions_util_.reset(); extensions_util_.reset();
base::RepeatingClosure null_closure; base::RepeatingClosure null_closure;
......
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