Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2533)

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2086833005: align WebMemoryPressureLevel with MemoryPressureListener::MemoryPressureLevel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check in render_thread_impl.cc Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/public/platform/WebMemoryPressureLevel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index e44661129283c8f6ab0872a8447defce1666a800..94412afdf0be736e07d75579633424da8c2d229a 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -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)
« no previous file with comments | « no previous file | third_party/WebKit/public/platform/WebMemoryPressureLevel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698