From bab8b3aad68bc5e105bc803ed8546d5a13d37339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 11 Oct 2022 09:00:17 +0200 Subject: [PATCH] deps: V8: cherry-pick 8b8703953616 Original commit message: [API] Remove second OnCriticalMemoryPressure Remove the deprecated OnCriticalMemoryPressure method with receives an informative parameter. R=mlippautz@chromium.org Bug: chromium:634547 Change-Id: I932c3b5030291294dd340362f0b20d374e3067c0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780533 Reviewed-by: Michael Lippautz Commit-Queue: Clemens Backes Cr-Commit-Position: refs/heads/main@{#83254} Refs: https://github.com/v8/v8/commit/8b870395361633a134a257c604470378d06335ed PR-URL: https://github.com/nodejs/node/pull/44958 Reviewed-By: Jiawen Geng Reviewed-By: Beth Griggs Reviewed-By: Rafael Gonzaga Reviewed-By: Richard Lau --- common.gypi | 2 +- deps/v8/include/v8-platform.h | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/common.gypi b/common.gypi index 5f629c49634b2c..3f708d89b1ef38 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.11', + 'v8_embedder_string': '-node.12', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h index 5d34372df50c2b..7b2c81d136401c 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -943,18 +943,6 @@ class Platform { */ virtual void OnCriticalMemoryPressure() {} - /** - * Enables the embedder to respond in cases where V8 can't allocate large - * memory regions. The |length| parameter is the amount of memory needed. - * Returns true if memory is now available. Returns false if no memory could - * be made available. V8 will retry allocations until this method returns - * false. - * - * Embedder overrides of this function must NOT call back into V8. - */ - V8_DEPRECATED("Use the method without informative parameter") - virtual bool OnCriticalMemoryPressure(size_t length) { return false; } - /** * Gets the number of worker threads used by * Call(BlockingTask)OnWorkerThread(). This can be used to estimate the number