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

Unified Diff: remoting/host/plugin/host_script_object.cc

Issue 26539006: Remoting: Move WeakPtrFactory members to be last (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« no previous file with comments | « remoting/host/plugin/host_script_object.h ('k') | remoting/host/setup/host_starter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/plugin/host_script_object.cc
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc
index c4572e20cdbafe60119d16db26133ec7f372e1e6..ddcb1cb651737be73572c893bc827a19f28e1e34 100644
--- a/remoting/host/plugin/host_script_object.cc
+++ b/remoting/host/plugin/host_script_object.cc
@@ -642,10 +642,11 @@ HostNPScriptObject::HostNPScriptObject(
plugin_task_runner_(plugin_task_runner),
am_currently_logging_(false),
state_(kDisconnected),
- weak_factory_(this),
- weak_ptr_(weak_factory_.GetWeakPtr()) {
+ weak_factory_(this) {
DCHECK(plugin_task_runner_->BelongsToCurrentThread());
+ weak_ptr_ = weak_factory_.GetWeakPtr();
+
// Set the thread task runner for the plugin thread so that timers and other
// code using |base::ThreadTaskRunnerHandle| could be used on the plugin
// thread.
« no previous file with comments | « remoting/host/plugin/host_script_object.h ('k') | remoting/host/setup/host_starter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698