Commit 7cb446c1 authored by Bill Budge's avatar Bill Budge Committed by Commit Bot

[d8] Override memory functions for PredictablePlatform.

- Implements GetPageAllocator and OnCriticalMemoryPressure methods, delegating
  to the default platform, in preparation for switching over to these for
  handling memory management.

Bug: chromium:756050
Change-Id: I66edb35ce2669ee9ffd53e82a63b598cc5b7f40c
Reviewed-on: https://chromium-review.googlesource.com/845035
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: 's avatarEric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50330}
parent a59215c7
......@@ -197,6 +197,18 @@ class PredictablePlatform : public Platform {
DCHECK_NOT_NULL(platform_);
}
PageAllocator* GetPageAllocator() override {
return platform_->GetPageAllocator();
}
void OnCriticalMemoryPressure() override {
platform_->OnCriticalMemoryPressure();
}
bool OnCriticalMemoryPressure(size_t length) override {
return platform_->OnCriticalMemoryPressure(length);
}
std::shared_ptr<TaskRunner> GetForegroundTaskRunner(
v8::Isolate* isolate) override {
return platform_->GetForegroundTaskRunner(isolate);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment