| Index: third_party/WebKit/Source/core/dom/TaskRunnerHelper.h
|
| diff --git a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.h b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.h
|
| index fb72520ea51694929384e84048ceeb3aaa307f7c..d475360a77cddc5c91fb7d4e199f8cb32bc03642 100644
|
| --- a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.h
|
| +++ b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "core/CoreExport.h"
|
| #include "wtf/Allocator.h"
|
| +#include "wtf/HashTraits.h"
|
|
|
| namespace blink {
|
|
|
| @@ -16,7 +17,7 @@ class LocalFrame;
|
| class ScriptState;
|
| class WebTaskRunner;
|
|
|
| -enum class TaskType {
|
| +enum class TaskType : unsigned {
|
| // Speced tasks and related internal tasks should be posted to one of
|
| // the following task runners. These task runners may be throttled.
|
| DOMManipulation,
|
| @@ -43,6 +44,14 @@ enum class TaskType {
|
| Unthrottled,
|
| };
|
|
|
| +// HashTraits for TaskType.
|
| +struct TaskTypeTraits : WTF::GenericHashTraits<TaskType> {
|
| + static const bool emptyValueIsZero = false;
|
| + static TaskType emptyValue() { return static_cast<TaskType>(-1); }
|
| + static void constructDeletedValue(TaskType& slot, bool) { slot = static_cast<TaskType>(-2); }
|
| + static bool isDeletedValue(TaskType value) { return value == static_cast<TaskType>(-2); }
|
| +};
|
| +
|
| class CORE_EXPORT TaskRunnerHelper final {
|
| STATIC_ONLY(TaskRunnerHelper);
|
| public:
|
|
|