diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2022-11-15 13:25:20 +0100 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2022-11-16 07:54:30 +0000 |
commit | 342a6a8e111c1b94d4516ab87ec9ca12e3159c0e (patch) | |
tree | c94807ce697dca718b37dee3e906a264962813a7 | |
parent | 0a66ee99b4e443f6525c244fd8c5fc098989d8e2 (diff) | |
download | qtwebengine-chromium-342a6a8e111c1b94d4516ab87ec9ca12e3159c0e.tar.gz |
[Backport] [PA] PA_YIELD_PROCESSOR for MSVC
This CL works around MSVC not liking inline assembly and replaces it
with an MSVC macro.
Bug: 1351310
Change-Id: I7c145248feffa1a2a13cc5127e875e24ded13cba
Review-URL: https://chromium-review.googlesource.com/c/chromium/src/+/3852891
Cr-Commit-Position: refs/heads/main@{#1038712}
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/443563
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/base/allocator/partition_allocator/yield_processor.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chromium/base/allocator/partition_allocator/yield_processor.h b/chromium/base/allocator/partition_allocator/yield_processor.h index 78256de0ed0..c97e16a20f9 100644 --- a/chromium/base/allocator/partition_allocator/yield_processor.h +++ b/chromium/base/allocator/partition_allocator/yield_processor.h @@ -16,6 +16,10 @@ #if BUILDFLAG(IS_NACL) // Inline assembly not allowed. #define PA_YIELD_PROCESSOR ((void)0) +#elif defined(COMPILER_MSVC) && !defined(__clang__) +// MSVC is in its own assemblyless world (crbug.com/1351310#c6). +#include <windows.h> +#define PA_YIELD_PROCESSOR (YieldProcessor()) #else #if defined(COMPILER_MSVC) |