Chromium Code Reviews| Index: base/task_scheduler/task_traits.cc |
| diff --git a/base/task_scheduler/task_traits.cc b/base/task_scheduler/task_traits.cc |
| index ad0e37f887166009b9608cf680a90d505e276f45..242503dc8d1975fc9dca233338ae35be42c7228b 100644 |
| --- a/base/task_scheduler/task_traits.cc |
| +++ b/base/task_scheduler/task_traits.cc |
| @@ -4,6 +4,8 @@ |
| #include "base/task_scheduler/task_traits.h" |
| +#include <stddef.h> |
| + |
| #include <ostream> |
| namespace base { |
| @@ -35,6 +37,10 @@ TaskTraits& TaskTraits::WithShutdownBehavior( |
| } |
| bool TaskTraits::operator==(const TaskTraits& other) const { |
| + static_assert(sizeof(TaskTraits) == |
| + offsetof(TaskTraits, shutdown_behavior_) + |
| + sizeof(TaskTraits::shutdown_behavior_), |
| + ""); |
|
robliao
2016/04/15 21:36:12
We should have a message here. Maybe "TaskTraits m
fdoray
2016/04/18 13:07:58
Done.
|
| return with_file_io_ == other.with_file_io_ && priority_ == other.priority_ && |
| shutdown_behavior_ == other.shutdown_behavior_; |
| } |