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

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: Make more tests single threaded Created 6 years, 6 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 25517d138df2997c96d112e61bd90025be8363ed..e37a5aac4333c9cc69fbacb5d73a6bd32bec6918 100644
--- a/cc/test/test_web_graphics_context_3d.cc
+++ b/cc/test/test_web_graphics_context_3d.cc
@@ -444,12 +444,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