From 9708e9c5993b82624fbce4ca66033d6b3d2a4e63 Mon Sep 17 00:00:00 2001 From: kwiberg Date: Tue, 29 Mar 2016 10:17:42 -0700 Subject: [PATCH] Don't call operator== with scoped_ptr and T* That won't work when rtc::scoped_ptr becomes a type alias for std::unique_ptr. BUG=webrtc:5520 Review URL: https://codereview.webrtc.org/1834103002 Cr-Commit-Position: refs/heads/master@{#12145} --- webrtc/api/java/jni/androidmediadecoder_jni.cc | 2 +- webrtc/api/java/jni/peerconnection_jni.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webrtc/api/java/jni/androidmediadecoder_jni.cc b/webrtc/api/java/jni/androidmediadecoder_jni.cc index 92d8583bc7..e2b58db6d4 100644 --- a/webrtc/api/java/jni/androidmediadecoder_jni.cc +++ b/webrtc/api/java/jni/androidmediadecoder_jni.cc @@ -463,7 +463,7 @@ int32_t MediaCodecVideoDecoder::ReleaseOnCodecThread() { } void MediaCodecVideoDecoder::CheckOnCodecThread() { - RTC_CHECK(codec_thread_ == ThreadManager::Instance()->CurrentThread()) + RTC_CHECK(codec_thread_.get() == ThreadManager::Instance()->CurrentThread()) << "Running on wrong thread!"; } diff --git a/webrtc/api/java/jni/peerconnection_jni.cc b/webrtc/api/java/jni/peerconnection_jni.cc index 85bd62d872..079fd79c9b 100644 --- a/webrtc/api/java/jni/peerconnection_jni.cc +++ b/webrtc/api/java/jni/peerconnection_jni.cc @@ -1078,11 +1078,11 @@ void OwnedFactoryAndThreads::JavaCallbackOnFactoryThreads() { ScopedLocalRefFrame local_ref_frame(jni); jclass j_factory_class = FindClass(jni, "org/webrtc/PeerConnectionFactory"); jmethodID m = nullptr; - if (Thread::Current() == worker_thread_) { + if (Thread::Current() == worker_thread_.get()) { LOG(LS_INFO) << "Worker thread JavaCallback"; m = GetStaticMethodID(jni, j_factory_class, "onWorkerThreadReady", "()V"); } - if (Thread::Current() == signaling_thread_) { + if (Thread::Current() == signaling_thread_.get()) { LOG(LS_INFO) << "Signaling thread JavaCallback"; m = GetStaticMethodID( jni, j_factory_class, "onSignalingThreadReady", "()V");