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

Unified Diff: remoting/client/jni/chromoting_jni_instance.cc

Issue 2142253002: [Remoting Android] Fix GetWeakPtr() calls on multiple threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.h ('k') | remoting/client/jni/jni_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/chromoting_jni_instance.cc
diff --git a/remoting/client/jni/chromoting_jni_instance.cc b/remoting/client/jni/chromoting_jni_instance.cc
index de73b4f987abebc957e4a0a8426b5e82579b405d..97f6693f0674066e881d8cf5b7e412465252b412 100644
--- a/remoting/client/jni/chromoting_jni_instance.cc
+++ b/remoting/client/jni/chromoting_jni_instance.cc
@@ -74,6 +74,7 @@ ChromotingJniInstance::ChromotingJniInstance(
capabilities_(capabilities),
weak_factory_(this) {
DCHECK(jni_runtime_->ui_task_runner()->BelongsToCurrentThread());
+ weak_ptr_ = weak_factory_.GetWeakPtr();
// Initialize XMPP config.
xmpp_config_.host = kXmppServer;
@@ -369,7 +370,7 @@ void ChromotingJniInstance::InjectClipboardEvent(
}
base::WeakPtr<ChromotingJniInstance> ChromotingJniInstance::GetWeakPtr() {
- return weak_factory_.GetWeakPtr();
+ return weak_ptr_;
}
void ChromotingJniInstance::ConnectToHostOnNetworkThread() {
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.h ('k') | remoting/client/jni/jni_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698