CrossThreadCopier: Consider arithmetic and enum types as safe.
The original code assumed that types convertible to int were safe to copy cross-thread. However, this condition is too narrow; any arithmetic types (integers and floats) and enum types are actually safe. This is fixed by this patch. Additionally, this patch rearranges the order of CrossThreadCopierBase's template parameters, because putting T in the last looks unusual. Also, the specializations of CrossThreadCopierBase are updated so that the readers can understand the specializations cover all the possible combinations of template parameters (except for <T, false, false, false>, which is intentionally undefined in the header). BUG=565765 R=haraken@chromium.org, hiroshige@chromium.org, tzik@chromium.org Review URL: https://codereview.chromium.org/1701013003 Cr-Commit-Position: refs/heads/master@{#376129}
Showing
Please register or sign in to comment