summaryrefslogtreecommitdiffstats
path: root/base/message_loop/message_pump_android.h
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 02:38:11 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 02:38:11 +0000
commit002414c002a132b67937869d52aeb85a0547b639 (patch)
tree234c353c38668c9ecf598cc5057961704b6f5a9b /base/message_loop/message_pump_android.h
parentfbff89f316a9c7f44b0f8e3fd96f37fef1b7c817 (diff)
downloadchromium_src-002414c002a132b67937869d52aeb85a0547b639.zip
chromium_src-002414c002a132b67937869d52aeb85a0547b639.tar.gz
chromium_src-002414c002a132b67937869d52aeb85a0547b639.tar.bz2
Make sure that the UI window created by base::MessagePumpForUI is destoyed on the same thread (Windows).
Currently the window created base::MessagePumpForUI can be destroyed on a wrong thread. base::MessagePumpForUI is a ref-counted class so it can (and does) outlive the owning base::MessageLoop. As the result DestroyWindow() can be called on a wrong thread. This makes TSAN unhappy and it reports races deep unside user32.dll. Changes in this CL: - The message pump is now notified when the owning message loop is being destroyed. The notification is used to free all resources that hve to be released on the base::MessageLoop's thread. - MessagePumpForUI::ScheduleWork() synchronizes access to the message-only window handle to avoid posting messages to the window during or after its destruction. BUG=241939 Review URL: https://chromiumcodereview.appspot.com/15709015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207278 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop/message_pump_android.h')
-rw-r--r--base/message_loop/message_pump_android.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/base/message_loop/message_pump_android.h b/base/message_loop/message_pump_android.h
index fd934a7..0473d3e 100644
--- a/base/message_loop/message_pump_android.h
+++ b/base/message_loop/message_pump_android.h
@@ -26,6 +26,7 @@ class BASE_EXPORT MessagePumpForUI : public MessagePump {
virtual void Quit() OVERRIDE;
virtual void ScheduleWork() OVERRIDE;
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE;
+ virtual void Shutdown() OVERRIDE;
virtual void Start(Delegate* delegate);