Commit 116d3648 authored by Etienne Bergeron's avatar Etienne Bergeron Committed by Commit Bot

Boost thread priority while loading COM VideoCapture

The thread priority boost need to be apply at each call.

This is a follow up on:
  https://chromium-review.googlesource.com/c/chromium/src/+/2378395


Noticed in b93726646e382c66
The crash shows that the SCOPED_MAY_LOAD_LIBRARY_AT_BACKGROUND_PRIORITY()
already got called. The thread is still at a background priority and
it is loading a DLL.

R=joenotcharles@chromium.org,guidou@chromium.org

Bug: 973868
Change-Id: Ib4f0eaf317b8b6408f1f4ede8607ff00c1b5cc5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2402163Reviewed-by: default avatarJoe Mason <joenotcharles@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805527}
parent 750d2c76
...@@ -457,7 +457,7 @@ bool VideoCaptureDeviceFactoryWin::CreateDeviceFilterDirectShow( ...@@ -457,7 +457,7 @@ bool VideoCaptureDeviceFactoryWin::CreateDeviceFilterDirectShow(
// Mitigate the issues caused by loading DLLs on a background thread // Mitigate the issues caused by loading DLLs on a background thread
// (http://crbug/973868). // (http://crbug/973868).
SCOPED_MAY_LOAD_LIBRARY_AT_BACKGROUND_PRIORITY(); SCOPED_MAY_LOAD_LIBRARY_AT_BACKGROUND_PRIORITY_REPEATEDLY();
HRESULT hr = moniker->BindToObject(0, 0, IID_PPV_ARGS(capture_filter)); HRESULT hr = moniker->BindToObject(0, 0, IID_PPV_ARGS(capture_filter));
if (FAILED(hr)) { if (FAILED(hr)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment