Commit 2e296f82 authored by hong.zheng's avatar hong.zheng Committed by Commit bot

align WebMemoryPressureLevel with MemoryPressureListener::MemoryPressureLevel

MemoryPressureListener::MemoryPressureLevel enum has changed to 0, 1, 2.
Let's align WebMemoryPressureLevel with it

BUG=

Review-Url: https://codereview.chromium.org/2086833005
Cr-Commit-Position: refs/heads/master@{#402691}
parent a9a380ce
......@@ -262,6 +262,20 @@ static_assert(static_cast<v8::MemoryPressureLevel>(
base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL) ==
v8::MemoryPressureLevel::kCritical, "critical level not align");
// WebMemoryPressureLevel should correspond to base::MemoryPressureListener.
static_assert(static_cast<blink::WebMemoryPressureLevel>(
base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE) ==
blink::WebMemoryPressureLevelNone,
"blink::WebMemoryPressureLevelNone not align");
static_assert(static_cast<blink::WebMemoryPressureLevel>(
base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE) ==
blink::WebMemoryPressureLevelModerate,
"blink::WebMemoryPressureLevelModerate not align");
static_assert(static_cast<blink::WebMemoryPressureLevel>(
base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL) ==
blink::WebMemoryPressureLevelCritical,
"blink::WebMemoryPressureLevelCritical not align");
class WebThreadForCompositor : public WebThreadImplForWorkerScheduler {
public:
explicit WebThreadForCompositor(base::Thread::Options options)
......
......@@ -10,9 +10,9 @@ namespace blink {
// These number must correspond to
// base::MemoryPressureListener::MemoryPressureLevel.
enum WebMemoryPressureLevel {
WebMemoryPressureLevelNone = -1,
WebMemoryPressureLevelModerate = 0,
WebMemoryPressureLevelCritical = 2,
WebMemoryPressureLevelNone,
WebMemoryPressureLevelModerate,
WebMemoryPressureLevelCritical,
};
} // namespace blink
......
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