[api] Deprecate memory savings mode

This mode was used for an experiment and isn't used anymore.
IsolateInBackgroundNotification() can be used to achieve the same
memory savings mode.

Bug: v8:13653
Change-Id: I4bc0b0bd7ceac43f22e16b234b9482af9fe03152
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156054
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85239}
This commit is contained in:
Dominik Inführ 2023-01-12 09:25:48 +01:00 committed by V8 LUCI CQ
parent a3b7c6706a
commit 7777e0321d
2 changed files with 4 additions and 0 deletions

View File

@ -1327,11 +1327,13 @@ class V8_EXPORT Isolate {
* V8 uses this notification to guide heuristics which may result in a
* smaller memory footprint at the cost of reduced runtime performance.
*/
V8_DEPRECATED("Use IsolateInBackgroundNotification() instead")
void EnableMemorySavingsMode();
/**
* Optional notification which will disable the memory savings mode.
*/
V8_DEPRECATED("Use IsolateInBackgroundNotification() instead")
void DisableMemorySavingsMode();
/**

View File

@ -16557,11 +16557,13 @@ TEST(TestMemorySavingsMode) {
LocalContext context;
v8::Isolate* isolate = context->GetIsolate();
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
START_ALLOW_USE_DEPRECATED();
CHECK(!i_isolate->IsMemorySavingsModeActive());
isolate->EnableMemorySavingsMode();
CHECK(i_isolate->IsMemorySavingsModeActive());
isolate->DisableMemorySavingsMode();
CHECK(!i_isolate->IsMemorySavingsModeActive());
END_ALLOW_USE_DEPRECATED();
}
TEST(Regress2333) {