Revert "Adding debugging code for error 170 when using GDI capturer"
This reverts commit e20080f2d8
.
Reason for revert: I've gotten the logging I needed so I'm removing this code before branch point.
Original change's description:
> Adding debugging code for error 170 when using GDI capturer
>
> We've had reports of the GDI capturer failing with this error:
> Failed to assign the desktop to the current thread: 170
>
> Oddly this only seems to happen with official builds. I am adding
> some debugging tracing and a crash so I can inspect the loaded
> modules and log info for folks who are hitting this problem.
>
> I will remove this code in the next build : )
>
> Change-Id: I00c6b21d6ed2d29fa4b0a61ff9fbc1e900aaa79e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5626398
> Commit-Queue: Jamie Walch <jamiewalch@chromium.org>
> Auto-Submit: Joe Downing <joedow@chromium.org>
> Commit-Queue: Joe Downing <joedow@chromium.org>
> Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1314347}
Change-Id: I3766c04551b59eee1767f1dbe02e9343bf9e12b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5707772
Auto-Submit: Joe Downing <joedow@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1327623}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
3b77e07e86
commit
a7933e9057
@@ -33,12 +33,6 @@
|
||||
#include "remoting/host/linux/wayland_utils.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include <windows.h>
|
||||
|
||||
#include "remoting/host/crash_process.h"
|
||||
#endif
|
||||
|
||||
namespace remoting {
|
||||
|
||||
class DesktopCapturerProxy::Core : public webrtc::DesktopCapturer::Callback {
|
||||
@@ -188,30 +182,6 @@ void DesktopCapturerProxy::Core::OnFrameCaptureStart() {
|
||||
void DesktopCapturerProxy::Core::OnCaptureResult(
|
||||
webrtc::DesktopCapturer::Result result,
|
||||
std::unique_ptr<webrtc::DesktopFrame> frame) {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
static int temporary_error_count = 0;
|
||||
temporary_error_count =
|
||||
result == webrtc::DesktopCapturer::Result::ERROR_TEMPORARY
|
||||
? temporary_error_count + 1
|
||||
: 0;
|
||||
|
||||
// Don't trigger the debugging code unless we've accumulated a substantial
|
||||
// number of temporary errors. Don't crash until we've gathered some logging
|
||||
// to help identify the issue.
|
||||
if (temporary_error_count > 20) {
|
||||
auto thread_id = ::GetCurrentThreadId();
|
||||
PLOG(ERROR) << "GetCurrentThreadId(): " << thread_id;
|
||||
auto desktop_handle = ::GetThreadDesktop(thread_id);
|
||||
PLOG(ERROR) << "GetThreadDesktop(): " << desktop_handle;
|
||||
auto set_thread_desktop_result = ::SetThreadDesktop(desktop_handle);
|
||||
PLOG(ERROR) << "SetThreadDesktop(): " << set_thread_desktop_result;
|
||||
|
||||
if (temporary_error_count > 25) {
|
||||
CrashProcess(FROM_HERE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
caller_task_runner_->PostTask(
|
||||
FROM_HERE, base::BindOnce(&DesktopCapturerProxy::OnFrameCaptured, proxy_,
|
||||
result, std::move(frame)));
|
||||
|
Reference in New Issue
Block a user