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

Unified Diff: content/public/test/nested_message_pump_android.cc

Issue 733533002: Do not start RunLoop of MessagePumpForUI in NestedMessagePumpAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix failure of FrameTreeBrowserTest.FrameTreeAfterCrash Created 6 years, 1 month 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: content/public/test/nested_message_pump_android.cc
diff --git a/content/public/test/nested_message_pump_android.cc b/content/public/test/nested_message_pump_android.cc
index c3adb2cda694f4044e11938bb36dc0e545d2dcd7..5f8ee787857c7324f7bc19d800c58386283562aa 100644
--- a/content/public/test/nested_message_pump_android.cc
+++ b/content/public/test/nested_message_pump_android.cc
@@ -47,7 +47,7 @@ struct NestedMessagePumpAndroid::RunState {
};
NestedMessagePumpAndroid::NestedMessagePumpAndroid()
- : state_(NULL) {
+ : state_(NULL), redundant_quit_executed_(false) {
}
NestedMessagePumpAndroid::~NestedMessagePumpAndroid() {
@@ -123,8 +123,6 @@ void NestedMessagePumpAndroid::Start(
DCHECK(env);
g_message_handler_obj.Get().Reset(
Java_NestedSystemMessageHandler_create(env));
-
- base::MessagePumpForUI::Start(delegate);
}
void NestedMessagePumpAndroid::Quit() {
@@ -132,8 +130,14 @@ void NestedMessagePumpAndroid::Quit() {
state_->should_quit = true;
state_->waitable_event.Signal();
return;
+ } else {
+ redundant_quit_executed_ = true;
}
- base::MessagePumpForUI::Quit();
+}
+
+bool NestedMessagePumpAndroid::IsRedundantQuitExpected() {
+ // Redundant quit is allowed only once.
+ return !redundant_quit_executed_;
}
void NestedMessagePumpAndroid::ScheduleWork() {
@@ -141,8 +145,6 @@ void NestedMessagePumpAndroid::ScheduleWork() {
state_->waitable_event.Signal();
return;
}
-
- base::MessagePumpForUI::ScheduleWork();
}
void NestedMessagePumpAndroid::ScheduleDelayedWork(
@@ -154,8 +156,6 @@ void NestedMessagePumpAndroid::ScheduleDelayedWork(
state_->delayed_work_time = delayed_work_time;
return;
}
-
- base::MessagePumpForUI::ScheduleDelayedWork(delayed_work_time);
}
// static

Powered by Google App Engine
This is Rietveld 408576698