Commit 4c490296 authored by Ivica Bogosavljevic's avatar Ivica Bogosavljevic Committed by Commit Bot

Fix `[Memory] Add OnCriticalMemoryPressure overload to v8::Platform.`

Fix 29bb707e

Compilation on GYP fails due to missing OnCriticalMemoryPressure
overload that accepts size_t parameter. In this case the compiler
complains about hiding virtual function.

This patch reintroduces the missing functions.

Bug: 
Change-Id: I493891f6908987a6f27c669a16f6c3772339333d
Reviewed-on: https://chromium-review.googlesource.com/844077Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#50306}
parent 538e584a
......@@ -688,6 +688,10 @@ class TestPlatform : public v8::Platform {
old_platform_->OnCriticalMemoryPressure();
}
bool OnCriticalMemoryPressure(size_t length) override {
return old_platform_->OnCriticalMemoryPressure(length);
}
std::shared_ptr<v8::TaskRunner> GetForegroundTaskRunner(
v8::Isolate* isolate) override {
return old_platform_->GetForegroundTaskRunner(isolate);
......
......@@ -41,6 +41,11 @@ class AllocationPlatform : public TestPlatform {
void OnCriticalMemoryPressure() override { oom_callback_called = true; }
bool OnCriticalMemoryPressure(size_t length) override {
oom_callback_called = true;
return true;
}
static AllocationPlatform* current_platform;
bool oom_callback_called = false;
};
......
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