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

Unified Diff: content/worker/webworkerclient_proxy.cc

Issue 8556001: Convert NewRunnableFunction/NewRunnableMethod calls to use base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 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
« no previous file with comments | « content/worker/webworkerclient_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/worker/webworkerclient_proxy.cc
diff --git a/content/worker/webworkerclient_proxy.cc b/content/worker/webworkerclient_proxy.cc
index 7bd5fd98da76aeb7bcf8bee0f9161fa48e49947c..42c15b344e1f16873026e1c8fc4020e64686427c 100644
--- a/content/worker/webworkerclient_proxy.cc
+++ b/content/worker/webworkerclient_proxy.cc
@@ -4,6 +4,7 @@
#include "content/worker/webworkerclient_proxy.h"
+#include "base/bind.h"
#include "base/command_line.h"
#include "base/message_loop.h"
#include "content/common/file_system/file_system_dispatcher.h"
@@ -45,7 +46,7 @@ WebWorkerClientProxy::WebWorkerClientProxy(int route_id,
: route_id_(route_id),
appcache_host_id_(0),
stub_(stub),
- ALLOW_THIS_IN_INITIALIZER_LIST(kill_process_factory_(this)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
devtools_agent_(NULL) {
}
@@ -209,7 +210,8 @@ void WebWorkerClientProxy::EnsureWorkerContextTerminates() {
// page. It's ok to post several of theese, because the first executed task
// will exit the message loop and subsequent ones won't be executed.
MessageLoop::current()->PostDelayedTask(FROM_HERE,
- kill_process_factory_.NewRunnableMethod(
- &WebWorkerClientProxy::workerContextDestroyed),
- kMaxTimeForRunawayWorkerMs);
+ base::Bind(
+ &WebWorkerClientProxy::workerContextDestroyed,
+ weak_factory_.GetWeakPtr()),
+ kMaxTimeForRunawayWorkerMs);
}
« no previous file with comments | « content/worker/webworkerclient_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698