Commit 53d9012b authored by Wenjie Shi's avatar Wenjie Shi Committed by Commit Bot

Update Windows WinRT sensor backend to fork on 19H1

There is a rare access violation bug in the Windows sensor WinRT API
that causes the client code crash on Windows RS5. The Chromium sensor
backend on Windows is using these WinRT APIs if the build is on Windows
10 (RS5 is a build of Win10) so Chromium is crashing due to this issue.

The WinRT bug was fixed in Windows 19H1. This CL updates the Chromium
sensor backend to only use the WinRT APIs if the system is on build
19H1 or above to avoid the AV.

Bug: 1063124
Change-Id: I6c9eb02170e5d62a75ea6ee511369254e27a9652
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122616
Commit-Queue: Wenjie Shi <wensh@microsoft.com>
Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753770}
parent 27445ebc
...@@ -48,8 +48,13 @@ bool PlatformSensorProvider::UseWindowsWinrt() { ...@@ -48,8 +48,13 @@ bool PlatformSensorProvider::UseWindowsWinrt() {
// this Windows version has yet to be released, Win10 is being // this Windows version has yet to be released, Win10 is being
// provisionally used for testing. This also means sensors will // provisionally used for testing. This also means sensors will
// stream if this implementation path is enabled. // stream if this implementation path is enabled.
// Note the fork occurs specifically on the 19H1 build of Win10
// because a previous version (RS5) contains an access violation
// issue in the WinRT APIs which causes the client code to crash.
// See http://crbug.com/1063124
return base::FeatureList::IsEnabled(features::kWinrtSensorsImplementation) && return base::FeatureList::IsEnabled(features::kWinrtSensorsImplementation) &&
base::win::GetVersion() >= base::win::Version::WIN10; base::win::GetVersion() >= base::win::Version::WIN10_19H1;
} }
#endif #endif
......
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