Index: src/compiler-dispatcher/compiler-dispatcher.h |
diff --git a/src/compiler-dispatcher/compiler-dispatcher.h b/src/compiler-dispatcher/compiler-dispatcher.h |
index f78c12f32aea6f2ce80fbdad1d6942efe98ee9de..38dd5976b38be05b4bec75716a69400f5c68b722 100644 |
--- a/src/compiler-dispatcher/compiler-dispatcher.h |
+++ b/src/compiler-dispatcher/compiler-dispatcher.h |
@@ -21,6 +21,7 @@ |
namespace v8 { |
class Platform; |
+enum class MemoryPressureLevel; |
namespace internal { |
@@ -83,6 +84,10 @@ class V8_EXPORT_PRIVATE CompilerDispatcher { |
// Aborts all jobs. Blocks if requested. |
void AbortAll(BlockingBehavior blocking); |
+ // Memory pressure notifications from the embedder. |
+ void MemoryPressureNotification(v8::MemoryPressureLevel level, |
+ bool is_isolate_locked); |
+ |
private: |
FRIEND_TEST(CompilerDispatcherTest, IdleTaskSmallIdleTime); |
FRIEND_TEST(IgnitionCompilerDispatcherTest, CompileOnBackgroundThread); |
@@ -123,6 +128,8 @@ class V8_EXPORT_PRIVATE CompilerDispatcher { |
// as script id is not necessarily unique. |
JobMap jobs_; |
+ base::AtomicValue<v8::MemoryPressureLevel> memory_pressure_level_; |
+ |
// The following members can be accessed from any thread. Methods need to hold |
// the mutex |mutex_| while accessing them. |
base::Mutex mutex_; |