aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/instruction-stream.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-12-04 08:20:37 +0100
committerMichaël Zasso <targos@protonmail.com>2018-12-06 15:23:33 +0100
commit9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3 (patch)
tree2b0c843168dafb939d8df8a15b2aa72b76dee51d /deps/v8/src/instruction-stream.cc
parentb8fbe69db1292307adb2c2b2e0d5ef48c4ab2faf (diff)
downloadandroid-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.gz
android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.bz2
android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.zip
deps: update V8 to 7.1.302.28
PR-URL: https://github.com/nodejs/node/pull/23423 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/src/instruction-stream.cc')
-rw-r--r--deps/v8/src/instruction-stream.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/deps/v8/src/instruction-stream.cc b/deps/v8/src/instruction-stream.cc
index 4b2a9012d6..20cb4ece16 100644
--- a/deps/v8/src/instruction-stream.cc
+++ b/deps/v8/src/instruction-stream.cc
@@ -51,16 +51,18 @@ void InstructionStream::CreateOffHeapInstructionStream(Isolate* isolate,
uint32_t* size) {
EmbeddedData d = EmbeddedData::FromIsolate(isolate);
- const uint32_t page_size = static_cast<uint32_t>(AllocatePageSize());
+ v8::PageAllocator* page_allocator = v8::internal::GetPlatformPageAllocator();
+ const uint32_t page_size =
+ static_cast<uint32_t>(page_allocator->AllocatePageSize());
const uint32_t allocated_size = RoundUp(d.size(), page_size);
uint8_t* allocated_bytes = static_cast<uint8_t*>(
- AllocatePages(GetRandomMmapAddr(), allocated_size, page_size,
- PageAllocator::kReadWrite));
+ AllocatePages(page_allocator, isolate->heap()->GetRandomMmapAddr(),
+ allocated_size, page_size, PageAllocator::kReadWrite));
CHECK_NOT_NULL(allocated_bytes);
std::memcpy(allocated_bytes, d.data(), d.size());
- CHECK(SetPermissions(allocated_bytes, allocated_size,
+ CHECK(SetPermissions(page_allocator, allocated_bytes, allocated_size,
PageAllocator::kReadExecute));
*data = allocated_bytes;
@@ -72,8 +74,10 @@ void InstructionStream::CreateOffHeapInstructionStream(Isolate* isolate,
// static
void InstructionStream::FreeOffHeapInstructionStream(uint8_t* data,
uint32_t size) {
- const uint32_t page_size = static_cast<uint32_t>(AllocatePageSize());
- CHECK(FreePages(data, RoundUp(size, page_size)));
+ v8::PageAllocator* page_allocator = v8::internal::GetPlatformPageAllocator();
+ const uint32_t page_size =
+ static_cast<uint32_t>(page_allocator->AllocatePageSize());
+ CHECK(FreePages(page_allocator, data, RoundUp(size, page_size)));
}
} // namespace internal