From 28ca44c7243b0fffa677fbc8eb07748c55a2ab8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Mon, 21 Oct 2019 16:07:44 +0200 Subject: [PATCH] deps: V8: cherry-pick cfe9172 Original commit message: [wasm] Disallow interpreter move The MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR macro defines a defaulted move constructor and move-assignment operator. The {std::unique_ptr} on the other hand needs the contained type to be complete when instantiating the move assignment operator. Hence, this fails e.g. on MSVC, see https://github.com/nodejs/node/pull/30020#issuecomment-544485991. It turns out that we never actually move the interpreter, so we can just replace the MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR by DISALLOW_COPY_AND_ASSIGN. R=ahaas@chromium.org Change-Id: Iba7d30243510ed9554be62b0c4c8e6f47f0c3307 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1871921 Reviewed-by: Andreas Haas Commit-Queue: Clemens Backes Cr-Commit-Position: refs/heads/master@{#64423} Refs: https://github.com/v8/v8/commit/cfe9172e64795a69112f8247bdcc00954ca9515e Backport-PR-URL: https://github.com/nodejs/node/pull/30513 PR-URL: https://github.com/nodejs/node/pull/30020 Reviewed-By: Colin Ihrig Reviewed-By: Jiawen Geng Reviewed-By: Anna Henningsen Reviewed-By: Matteo Collina --- common.gypi | 2 +- deps/v8/src/wasm/wasm-debug.cc | 4 +++- deps/v8/src/wasm/wasm-interpreter.h | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/common.gypi b/common.gypi index 4119517dbbe108..5ea3e365064ffd 100644 --- a/common.gypi +++ b/common.gypi @@ -39,7 +39,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.10', + 'v8_embedder_string': '-node.11', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/wasm/wasm-debug.cc b/deps/v8/src/wasm/wasm-debug.cc index ea989c081dff82..f3580e4427d7a4 100644 --- a/deps/v8/src/wasm/wasm-debug.cc +++ b/deps/v8/src/wasm/wasm-debug.cc @@ -97,7 +97,6 @@ MaybeHandle GetLocalName(Isolate* isolate, } class InterpreterHandle { - MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(InterpreterHandle); Isolate* isolate_; const WasmModule* module_; WasmInterpreter interpreter_; @@ -461,6 +460,9 @@ class InterpreterHandle { } return local_scope_object; } + + private: + DISALLOW_COPY_AND_ASSIGN(InterpreterHandle); }; } // namespace diff --git a/deps/v8/src/wasm/wasm-interpreter.h b/deps/v8/src/wasm/wasm-interpreter.h index 4eb0675aba805d..e0a32c71d65dcb 100644 --- a/deps/v8/src/wasm/wasm-interpreter.h +++ b/deps/v8/src/wasm/wasm-interpreter.h @@ -172,8 +172,6 @@ class V8_EXPORT_PRIVATE WasmInterpreter { uint32_t ActivationFrameBase(uint32_t activation_id); }; - MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(WasmInterpreter); - WasmInterpreter(Isolate* isolate, const WasmModule* module, const ModuleWireBytes& wire_bytes, Handle instance); @@ -220,6 +218,8 @@ class V8_EXPORT_PRIVATE WasmInterpreter { private: Zone zone_; std::unique_ptr internals_; + + DISALLOW_COPY_AND_ASSIGN(WasmInterpreter); }; } // namespace wasm