Migrate rtc_base to webrtc::Mutex.
Bug: webrtc:11567 Change-Id: Ib8630e0cf1266e7c3f8ce718e1ed9f8848f42ec8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178806 Reviewed-by: Tommi <tommi@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Markus Handell <handellm@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31682}
This commit is contained in:
committed by
Commit Bot
parent
44dd3d7435
commit
18523c34b4
@ -10,6 +10,7 @@
|
||||
|
||||
#include "sdk/android/native_api/jni/java_types.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
@ -51,14 +52,15 @@ Iterable::Iterator::Iterator(JNIEnv* jni, const JavaRef<jobject>& iterable)
|
||||
Iterable::Iterator::Iterator(Iterator&& other)
|
||||
: jni_(std::move(other.jni_)),
|
||||
iterator_(std::move(other.iterator_)),
|
||||
value_(std::move(other.value_)),
|
||||
thread_checker_(std::move(other.thread_checker_)) {}
|
||||
value_(std::move(other.value_)) {
|
||||
RTC_DCHECK_RUN_ON(&thread_checker_);
|
||||
}
|
||||
|
||||
Iterable::Iterator::~Iterator() = default;
|
||||
|
||||
// Advances the iterator one step.
|
||||
Iterable::Iterator& Iterable::Iterator::operator++() {
|
||||
RTC_CHECK(thread_checker_.IsCurrent());
|
||||
RTC_DCHECK_RUN_ON(&thread_checker_);
|
||||
if (AtEnd()) {
|
||||
// Can't move past the end.
|
||||
return *this;
|
||||
@ -93,7 +95,7 @@ ScopedJavaLocalRef<jobject>& Iterable::Iterator::operator*() {
|
||||
}
|
||||
|
||||
bool Iterable::Iterator::AtEnd() const {
|
||||
RTC_CHECK(thread_checker_.IsCurrent());
|
||||
RTC_DCHECK_RUN_ON(&thread_checker_);
|
||||
return jni_ == nullptr || IsNull(jni_, iterator_);
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,9 @@
|
||||
#define SDK_ANDROID_NATIVE_API_JNI_JAVA_TYPES_H_
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user