fix: Revert "remove MarkHghMemoryUsage api" (#13421)

* fix: Revert "remove MarkHghMemoryUsage api"

This reverts commit 0de85fd49f.

* update native_mate ref
This commit is contained in:
Robo
2018-06-26 23:14:59 +05:30
committed by Shelley Vohr
parent 475a1e30d9
commit 4efed0f5ed
3 changed files with 7 additions and 1 deletions

View File

@@ -331,6 +331,10 @@ WebContents::WebContents(v8::Isolate* isolate, const mate::Dictionary& options)
request_id_(0),
background_throttling_(true),
enable_devtools_(true) {
// WebContents may need to emit events when it is garbage collected, so it
// has to be deleted in the first gc callback.
MarkHighMemoryUsage();
// Read options.
options.Get("backgroundThrottling", &background_throttling_);

View File

@@ -223,6 +223,7 @@ NativeImage::NativeImage(v8::Isolate* isolate, const gfx::Image& image)
isolate->AdjustAmountOfExternalAllocatedMemory(
image_.ToImageSkia()->bitmap()->computeSize64());
}
MarkHighMemoryUsage();
}
#if defined(OS_WIN)
@@ -237,6 +238,7 @@ NativeImage::NativeImage(v8::Isolate* isolate, const base::FilePath& hicon_path)
isolate->AdjustAmountOfExternalAllocatedMemory(
image_.ToImageSkia()->bitmap()->computeSize64());
}
MarkHighMemoryUsage();
}
#endif