fix: use the gin PageAllocator instead of V8::PageAllocator (#26331)

* fix: use the gin PageAllocator instead of V8::PageAllocator

This makes browser-process JS allocate pages using the base/gin allocator thus ensuring flags such as MAP_JIT are appropriately applied.

* chore: add gin patch

* update patches

Co-authored-by: Electron Bot <electron@github.com>
This commit is contained in:
Samuel Attard 2020-11-09 13:57:24 -08:00 committed by GitHub
parent 02a8c0a640
commit 40ebdb5c42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 159 additions and 1 deletions

View file

@ -246,7 +246,7 @@ v8::Isolate* JavascriptEnvironment::Initialize(uv_loop_t* event_loop) {
node::tracing::TraceEventHelper::SetAgent(tracing_agent);
platform_ = node::CreatePlatform(
base::RecommendedMaxNumberOfThreadsInThreadGroup(3, 8, 0.1, 0),
tracing_controller);
tracing_controller, gin::V8Platform::PageAllocator());
v8::V8::InitializePlatform(platform_);
gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode,