未验证 提交 5f9e558a 编写于 作者: C Chinmay Garde 提交者: GitHub

Forward low memory notifications from the shell to DartVM. (#14517)

上级 46d76eb8
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册