Commit 90896397 authored by Jakob Kummerow's avatar Jakob Kummerow Committed by Commit Bot

[gin] V8 platform: handle new enum value

V8's PageAllocator interface is introducing a new value of the
"Permissions" enum for the benefit of non-Chrome embedders of
V8. This patch teaches Chrome to handle that value (by effectively
ignoring it).

Bug: chromium:1117591
Change-Id: I08921b4bf975d3977e4fb7410e6f5e1e7e5be2f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2450275
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814509}
parent 82074c56
......@@ -217,6 +217,13 @@ class PageAllocator : public v8::PageAllocator {
size_t length,
size_t alignment,
v8::PageAllocator::Permission permissions) override {
if (permissions == v8::PageAllocator::Permission::kNoAccessWillJitLater) {
// We could use this information to conditionally set the MAP_JIT flag
// on Mac-arm64; however this permissions value is intended to be a
// short-term solution, so we continue to set MAP_JIT for all V8 pages
// for now.
permissions = v8::PageAllocator::Permission::kNoAccess;
}
base::PageAccessibilityConfiguration config = GetPageConfig(permissions);
bool commit = (permissions != v8::PageAllocator::Permission::kNoAccess);
return base::AllocPages(address, length, alignment, config,
......
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