Commit c0bc99e0 authored by JianxiaoLuIntel's avatar JianxiaoLuIntel Committed by V8 LUCI CQ

[heap] remove redundant branch in AllocateReadOnlyPage

Change-Id: I6411c752e3de1fb6e1547ccfe41265c5615eb421
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3296148
Auto-Submit: Jianxiao Lu <jianxiao.lu@intel.com>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78037}
parent 4fc1d8d0
......@@ -584,10 +584,8 @@ template EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE)
ReadOnlyPage* MemoryAllocator::AllocateReadOnlyPage(size_t size,
ReadOnlySpace* owner) {
BasicMemoryChunk* chunk = nullptr;
if (chunk == nullptr) {
chunk = AllocateBasicChunk(size, size, NOT_EXECUTABLE, owner);
}
BasicMemoryChunk* chunk =
AllocateBasicChunk(size, size, NOT_EXECUTABLE, owner);
if (chunk == nullptr) return nullptr;
return owner->InitializePage(chunk);
}
......
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