diff --git a/shell/common/shell.cc b/shell/common/shell.cc index bef72617c2bd6..fc7833fcbfb70 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -393,6 +393,12 @@ Shell::~Shell() { } void Shell::NotifyLowMemoryWarning() const { + // This does not require a current isolate but does require a running VM. + // Since a valid shell will not be returned to the embedder without a valid + // DartVMRef, we can be certain that this is a safe spot to assume a VM is + // running. + ::Dart_NotifyLowMemory(); + task_runners_.GetGPUTaskRunner()->PostTask( [rasterizer = rasterizer_->GetWeakPtr()]() { if (rasterizer) {