Don't call operator== with scoped_ptr<T> 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}
This commit is contained in:
kwiberg
2016-03-29 10:17:42 -07:00
committed by Commit bot
parent 345807e599
commit 9708e9c599
2 changed files with 3 additions and 3 deletions

View File

@ -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!";
}

View File

@ -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");