From 6c91641271e536ffaa88a1dff5127e42ee99a91e Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 25 Jan 2016 11:39:07 +0100 Subject: BASELINE: Update Chromium to 49.0.2623.23 Also adds missing printing sources. Change-Id: I3726b8f0c7d6751c9fc846096c571fadca7108cd Reviewed-by: Oswald Buddenhagen --- chromium/base/message_loop/message_loop.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'chromium/base/message_loop/message_loop.cc') diff --git a/chromium/base/message_loop/message_loop.cc b/chromium/base/message_loop/message_loop.cc index a44f46863e4..e84765a0f7a 100644 --- a/chromium/base/message_loop/message_loop.cc +++ b/chromium/base/message_loop/message_loop.cc @@ -5,6 +5,7 @@ #include "base/message_loop/message_loop.h" #include +#include #include "base/bind.h" #include "base/compiler_specific.h" @@ -21,6 +22,7 @@ #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "base/tracked_objects.h" +#include "build/build_config.h" #if defined(OS_MACOSX) #include "base/message_loop/message_pump_mac.h" @@ -131,9 +133,11 @@ MessageLoop::MessageLoop(scoped_ptr pump) } MessageLoop::~MessageLoop() { - // current() could be NULL if this message loop is destructed before it is - // bound to a thread. - DCHECK(current() == this || !current()); + // If |pump_| is non-null, this message loop has been bound and should be the + // current one on this thread. Otherwise, this loop is being destructed before + // it was bound to a thread, so a different message loop (or no loop at all) + // may be current. + DCHECK((pump_ && current() == this) || (!pump_ && current() != this)); // iOS just attaches to the loop, it doesn't Run it. // TODO(stuartmorgan): Consider wiring up a Detach(). @@ -175,7 +179,8 @@ MessageLoop::~MessageLoop() { task_runner_ = NULL; // OK, now make it so that no one can find us. - lazy_tls_ptr.Pointer()->Set(NULL); + if (current() == this) + lazy_tls_ptr.Pointer()->Set(nullptr); } // static @@ -417,7 +422,7 @@ void MessageLoop::SetTaskRunner( DCHECK_EQ(this, current()); DCHECK(task_runner->BelongsToCurrentThread()); DCHECK(!unbound_task_runner_); - task_runner_ = task_runner.Pass(); + task_runner_ = std::move(task_runner); SetThreadTaskRunnerHandle(); } -- cgit v1.2.3