Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3870)

Unified Diff: cc/test/test_web_graphics_context_3d.cc

Issue 134623005: Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() {

Powered by Google App Engine
This is Rietveld 408576698