Commit b93b8145 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

[ScopedTaskEnvironment] Fix UBSan issue calling a member method from...

[ScopedTaskEnvironment] Fix UBSan issue calling a member method from ScopedTaskEnvironment's initializer list

TBR=fdoray@chromium.org

Bug: 946657, 983290
Change-Id: I3e83611141f364b1d7e3a42442d896bdf6956877
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1700269Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677094}
parent 3057d467
...@@ -323,7 +323,7 @@ class ScopedTaskEnvironment { ...@@ -323,7 +323,7 @@ class ScopedTaskEnvironment {
// ScopedTaskEnvironment's constructor. Helper for the migration (while // ScopedTaskEnvironment's constructor. Helper for the migration (while
// TimeSource is optionally defined by MainThreadType or NowSource). // TimeSource is optionally defined by MainThreadType or NowSource).
template <class... ArgTypes> template <class... ArgTypes>
constexpr TimeSource TimeSourceForTraits(ArgTypes... args) { static constexpr TimeSource TimeSourceForTraits(ArgTypes... args) {
const auto explicit_time_source = const auto explicit_time_source =
trait_helpers::GetOptionalEnum<TimeSource>(args...); trait_helpers::GetOptionalEnum<TimeSource>(args...);
const auto explicit_main_thread_type = const auto explicit_main_thread_type =
......
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