"Remove" loophole in rtc::Thread::ScopedDisallowBlockingCalls

It was previously possible to escape the sandbox by calling
rtc::Thread::SetAllowBlockingCalls(true).

This CL only removes the loophole on non-Android builds, because we
still have old Android code that relies on it. We expect that code to
go away soon-ish, though.

Bug: webrtc:9987
Change-Id: Ida96400d0abe430af4c2046284795d37d64f6613
Reviewed-on: https://webrtc-review.googlesource.com/c/123523
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26792}
This commit is contained in:
Karl Wiberg
2019-02-21 13:38:30 +01:00
committed by Commit Bot
parent 826f2e7f34
commit 32562250ca
3 changed files with 17 additions and 6 deletions

View File

@ -66,7 +66,7 @@ enum { kMaxEncodedLogFrames = 10 };
static inline void AllowBlockingCalls() {
rtc::Thread* current_thread = rtc::Thread::Current();
if (current_thread != NULL)
current_thread->SetAllowBlockingCalls(true);
current_thread->DEPRECATED_AllowBlockingCalls();
}
// Checks for any Java exception, prints stack backtrace and clears