| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 07b967f2b8cf3bf37e093d1e3724b142d50663ad..2501544f3cd3ee13e1630922a62dd9a9cd811bb9 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -8555,10 +8555,14 @@ void Isolate::IsolateInBackgroundNotification() {
|
|
|
| void Isolate::MemoryPressureNotification(MemoryPressureLevel level) {
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
|
| - isolate->heap()->MemoryPressureNotification(level, Locker::IsLocked(this));
|
| + bool on_isolate_thread =
|
| + v8::Locker::IsActive()
|
| + ? isolate->thread_manager()->IsLockedByCurrentThread()
|
| + : i::ThreadId::Current().Equals(isolate->thread_id());
|
| + isolate->heap()->MemoryPressureNotification(level, on_isolate_thread);
|
| isolate->allocator()->MemoryPressureNotification(level);
|
| - isolate->compiler_dispatcher()->MemoryPressureNotification(
|
| - level, Locker::IsLocked(this));
|
| + isolate->compiler_dispatcher()->MemoryPressureNotification(level,
|
| + on_isolate_thread);
|
| }
|
|
|
| void Isolate::SetRAILMode(RAILMode rail_mode) {
|
|
|