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

Unified Diff: ppapi/proxy/ppb_message_loop_proxy.cc

Issue 2132593002: Remove remaining calls to deprecated MessageLoop methods on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove ios call sites Created 4 years, 5 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: ppapi/proxy/ppb_message_loop_proxy.cc
diff --git a/ppapi/proxy/ppb_message_loop_proxy.cc b/ppapi/proxy/ppb_message_loop_proxy.cc
index 7f2fc337849720be301957626cfdaeb472f288f0..21ccf0cf68d85a9a6ab1d0df503c4a1d9699d847 100644
--- a/ppapi/proxy/ppb_message_loop_proxy.cc
+++ b/ppapi/proxy/ppb_message_loop_proxy.cc
@@ -10,7 +10,6 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
-#include "base/location.h"
#include "base/threading/thread_task_runner_handle.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/ppb_message_loop.h"
@@ -109,11 +108,17 @@ int32_t MessageLoopResource::Run() {
if (is_main_thread_loop_)
return PP_ERROR_INPROGRESS;
+ base::RunLoop* previous_run_loop = run_loop_;
+ base::RunLoop run_loop;
+ run_loop_ = &run_loop;
+
nested_invocations_++;
CallWhileUnlocked(
- base::Bind(&base::MessageLoop::Run, base::Unretained(loop_.get())));
+ base::Bind(&base::RunLoop::Run, base::Unretained(run_loop_)));
nested_invocations_--;
+ run_loop_ = previous_run_loop;
gab 2016/07/08 18:36:08 Why does |run_loop_| need to be a member if it's o
fdoray 2016/07/08 20:21:10 I planned to use run_loop_ to quit the messageloop
+
if (should_destroy_ && nested_invocations_ == 0) {
task_runner_ = NULL;
loop_.reset();

Powered by Google App Engine
This is Rietveld 408576698