Commit 18751c5b authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[include] Make Platform::GetPageAllocator abstract

All embedders override this method now, so it can be abstract.

R=mlippautz@chromium.org

Bug: v8:12425
Change-Id: I4db5d74341c9519222592a88d247bc2aa2be03a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780538Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81910}
parent 012665e3
...@@ -924,10 +924,7 @@ class Platform { ...@@ -924,10 +924,7 @@ class Platform {
/** /**
* Allows the embedder to manage memory page allocations. * Allows the embedder to manage memory page allocations.
*/ */
virtual PageAllocator* GetPageAllocator() { virtual PageAllocator* GetPageAllocator() = 0;
// TODO(bbudge) Make this abstract after all embedders implement this.
return nullptr;
}
/** /**
* Allows the embedder to specify a custom allocator used for zones. * Allows the embedder to specify a custom allocator used for zones.
......
...@@ -202,6 +202,8 @@ class MockPlatform : public v8::Platform { ...@@ -202,6 +202,8 @@ class MockPlatform : public v8::Platform {
MockPlatform(const MockPlatform&) = delete; MockPlatform(const MockPlatform&) = delete;
MockPlatform& operator=(const MockPlatform&) = delete; MockPlatform& operator=(const MockPlatform&) = delete;
PageAllocator* GetPageAllocator() override { UNIMPLEMENTED(); }
int NumberOfWorkerThreads() override { return 1; } int NumberOfWorkerThreads() override { return 1; }
std::shared_ptr<TaskRunner> GetForegroundTaskRunner( std::shared_ptr<TaskRunner> GetForegroundTaskRunner(
......
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