mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 13:50:40 +01:00
Make member internal::SynchronousMethodCall::e_ a non-pointer.
Bug: None Change-Id: Id634f1c1ccab8de7862160f30f64b5a5e7a19ae9 Reviewed-on: https://webrtc-review.googlesource.com/c/111080 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25650}
This commit is contained in:
parent
a859d41366
commit
58376f376a
2 changed files with 4 additions and 5 deletions
|
@ -14,7 +14,7 @@ namespace webrtc {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
SynchronousMethodCall::SynchronousMethodCall(rtc::MessageHandler* proxy)
|
SynchronousMethodCall::SynchronousMethodCall(rtc::MessageHandler* proxy)
|
||||||
: e_(), proxy_(proxy) {}
|
: proxy_(proxy) {}
|
||||||
|
|
||||||
SynchronousMethodCall::~SynchronousMethodCall() = default;
|
SynchronousMethodCall::~SynchronousMethodCall() = default;
|
||||||
|
|
||||||
|
@ -23,15 +23,14 @@ void SynchronousMethodCall::Invoke(const rtc::Location& posted_from,
|
||||||
if (t->IsCurrent()) {
|
if (t->IsCurrent()) {
|
||||||
proxy_->OnMessage(nullptr);
|
proxy_->OnMessage(nullptr);
|
||||||
} else {
|
} else {
|
||||||
e_ = absl::make_unique<rtc::Event>();
|
|
||||||
t->Post(posted_from, this, 0);
|
t->Post(posted_from, this, 0);
|
||||||
e_->Wait(rtc::Event::kForever);
|
e_.Wait(rtc::Event::kForever);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SynchronousMethodCall::OnMessage(rtc::Message*) {
|
void SynchronousMethodCall::OnMessage(rtc::Message*) {
|
||||||
proxy_->OnMessage(nullptr);
|
proxy_->OnMessage(nullptr);
|
||||||
e_->Set();
|
e_.Set();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
|
|
@ -143,7 +143,7 @@ class SynchronousMethodCall : public rtc::MessageData,
|
||||||
private:
|
private:
|
||||||
void OnMessage(rtc::Message*) override;
|
void OnMessage(rtc::Message*) override;
|
||||||
|
|
||||||
std::unique_ptr<rtc::Event> e_;
|
rtc::Event e_;
|
||||||
rtc::MessageHandler* proxy_;
|
rtc::MessageHandler* proxy_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue