diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-17 14:46:48 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-15 12:56:17 +0200 |
commit | 03709b66fb995a68a1b8dcb4f8d25707275459dd (patch) | |
tree | 31c72e5f43ccd9fc0f31bfba79eb58e71881f7b3 | |
parent | 743f616ccac70cf4f76c0f313f73f2916459310d (diff) | |
download | qtwebengine-chromium-03709b66fb995a68a1b8dcb4f8d25707275459dd.tar.gz |
<chromium> Set message loop before creating message pump
The constructor of MessagePumpForUIQt uses MessageLoopForUI::current()
so current must be set before creating the message pump.
Change-Id: I58822d0eabf625cae8340778fac54fc7818c46b6
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
-rw-r--r-- | chromium/base/message_loop/message_loop.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chromium/base/message_loop/message_loop.cc b/chromium/base/message_loop/message_loop.cc index b417f2fffe8..6100a213f23 100644 --- a/chromium/base/message_loop/message_loop.cc +++ b/chromium/base/message_loop/message_loop.cc @@ -248,15 +248,15 @@ MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory) } void MessageLoop::BindToCurrentThread() { + DCHECK(!current()) << "should only have one message loop per thread"; + GetTLSMessageLoop()->Set(this); + DCHECK(!pump_); if (!pump_factory_.is_null()) pump_ = std::move(pump_factory_).Run(); else pump_ = CreateMessagePumpForType(type_); - DCHECK(!current()) << "should only have one message loop per thread"; - GetTLSMessageLoop()->Set(this); - incoming_task_queue_->StartScheduling(); unbound_task_runner_->BindToCurrentThread(); unbound_task_runner_ = nullptr; |