Commit 1fa16da7 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

Avoid passing rvalue references to VirtualMemory

The idea of movable data structures is to pass them by value. This is
also preferred by the style guide.

R=ahaas@chromium.org
CC=sattlerf@google.com

Bug: v8:8015
Change-Id: Ica016425d624f4497e374b25b363c1f2eb49b4c0
Reviewed-on: https://chromium-review.googlesource.com/1245762Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56238}
parent 6b5b3a5a
...@@ -498,7 +498,7 @@ void MemoryChunk::SetReadAndWritable() { ...@@ -498,7 +498,7 @@ void MemoryChunk::SetReadAndWritable() {
MemoryChunk* MemoryChunk::Initialize(Heap* heap, Address base, size_t size, MemoryChunk* MemoryChunk::Initialize(Heap* heap, Address base, size_t size,
Address area_start, Address area_end, Address area_start, Address area_end,
Executability executable, Space* owner, Executability executable, Space* owner,
VirtualMemory&& reservation) { VirtualMemory reservation) {
MemoryChunk* chunk = FromAddress(base); MemoryChunk* chunk = FromAddress(base);
DCHECK(base == chunk->address()); DCHECK(base == chunk->address());
......
...@@ -653,7 +653,7 @@ class MemoryChunk { ...@@ -653,7 +653,7 @@ class MemoryChunk {
static MemoryChunk* Initialize(Heap* heap, Address base, size_t size, static MemoryChunk* Initialize(Heap* heap, Address base, size_t size,
Address area_start, Address area_end, Address area_start, Address area_end,
Executability executable, Space* owner, Executability executable, Space* owner,
VirtualMemory&& reservation); VirtualMemory reservation);
// Should be called when memory chunk is about to be freed. // Should be called when memory chunk is about to be freed.
void ReleaseAllocatedMemory(); void ReleaseAllocatedMemory();
......
...@@ -318,7 +318,7 @@ WasmCode::~WasmCode() { ...@@ -318,7 +318,7 @@ WasmCode::~WasmCode() {
} }
NativeModule::NativeModule(Isolate* isolate, const WasmFeatures& enabled, NativeModule::NativeModule(Isolate* isolate, const WasmFeatures& enabled,
bool can_request_more, VirtualMemory&& code_space, bool can_request_more, VirtualMemory code_space,
WasmCodeManager* code_manager, WasmCodeManager* code_manager,
std::shared_ptr<const WasmModule> module, std::shared_ptr<const WasmModule> module,
const ModuleEnv& env) const ModuleEnv& env)
......
...@@ -356,7 +356,7 @@ class V8_EXPORT_PRIVATE NativeModule final { ...@@ -356,7 +356,7 @@ class V8_EXPORT_PRIVATE NativeModule final {
friend class NativeModuleModificationScope; friend class NativeModuleModificationScope;
NativeModule(Isolate* isolate, const WasmFeatures& enabled_features, NativeModule(Isolate* isolate, const WasmFeatures& enabled_features,
bool can_request_more, VirtualMemory&& code_space, bool can_request_more, VirtualMemory code_space,
WasmCodeManager* code_manager, WasmCodeManager* code_manager,
std::shared_ptr<const WasmModule> module, const ModuleEnv& env); std::shared_ptr<const WasmModule> module, const ModuleEnv& env);
......
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