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

Unified Diff: cc/test/test_context_support.cc

Issue 120913004: aura: Ensure OwnedMailbox not used with invalid or destroyed GLHelper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ownedmailbox: test Created 6 years, 11 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_context_support.cc
diff --git a/cc/test/test_context_support.cc b/cc/test/test_context_support.cc
index ec010fcd482f8cfe847fc7bb362aa1f6d5865d86..9558042b56081cf2442d5c8ae40861144c5735e9 100644
--- a/cc/test/test_context_support.cc
+++ b/cc/test/test_context_support.cc
@@ -19,11 +19,19 @@ TestContextSupport::~TestContextSupport() {}
void TestContextSupport::SignalSyncPoint(uint32 sync_point,
const base::Closure& callback) {
sync_point_callbacks_.push_back(callback);
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&TestContextSupport::CallAllSyncPointCallbacks,
+ weak_ptr_factory_.GetWeakPtr()));
}
void TestContextSupport::SignalQuery(uint32 query,
const base::Closure& callback) {
sync_point_callbacks_.push_back(callback);
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&TestContextSupport::CallAllSyncPointCallbacks,
+ weak_ptr_factory_.GetWeakPtr()));
}
void TestContextSupport::SetSurfaceVisible(bool visible) {
@@ -53,7 +61,6 @@ void TestContextSupport::Swap() {
base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&TestContextSupport::OnSwapBuffersComplete,
weak_ptr_factory_.GetWeakPtr()));
- CallAllSyncPointCallbacks();
}
void TestContextSupport::PartialSwapBuffers(gfx::Rect sub_buffer) {
@@ -62,7 +69,6 @@ void TestContextSupport::PartialSwapBuffers(gfx::Rect sub_buffer) {
base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&TestContextSupport::OnSwapBuffersComplete,
weak_ptr_factory_.GetWeakPtr()));
- CallAllSyncPointCallbacks();
}
void TestContextSupport::SetSwapBuffersCompleteCallback(

Powered by Google App Engine
This is Rietveld 408576698