| Index: cc/test/test_web_graphics_context_3d.cc
|
| diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc
|
| index 59b7440d63854475fffbdb221a5f27b945adef1a..5f220376798dc9bcc4276f48364d48c175b57328 100644
|
| --- a/cc/test/test_web_graphics_context_3d.cc
|
| +++ b/cc/test/test_web_graphics_context_3d.cc
|
| @@ -443,12 +443,15 @@ void TestWebGraphicsContext3D::loseContextCHROMIUM(GLenum current,
|
| if (context_lost_)
|
| return;
|
| context_lost_ = true;
|
| - if (!context_lost_callback_.is_null())
|
| - context_lost_callback_.Run();
|
|
|
| for (size_t i = 0; i < shared_contexts_.size(); ++i)
|
| shared_contexts_[i]->loseContextCHROMIUM(current, other);
|
| shared_contexts_.clear();
|
| +
|
| + // In the single thread case, this could cause the context to be
|
| + // synchronously deleted, so do it last.
|
| + if (!context_lost_callback_.is_null())
|
| + context_lost_callback_.Run();
|
| }
|
|
|
| void TestWebGraphicsContext3D::finish() {
|
|
|