Skip to content

Commit

Permalink
deps: V8: cherry-pick cfe9172
Browse files Browse the repository at this point in the history
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
    #30020 (comment).

    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 <ahaas@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#64423}

Refs: v8/v8@cfe9172

Backport-PR-URL: #30513
PR-URL: #30020
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
targos authored and MylesBorins committed Nov 21, 2019
1 parent ba4abfd commit 28ca44c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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 #####

Expand Down
4 changes: 3 additions & 1 deletion deps/v8/src/wasm/wasm-debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ MaybeHandle<String> GetLocalName(Isolate* isolate,
}

class InterpreterHandle {
MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(InterpreterHandle);
Isolate* isolate_;
const WasmModule* module_;
WasmInterpreter interpreter_;
Expand Down Expand Up @@ -461,6 +460,9 @@ class InterpreterHandle {
}
return local_scope_object;
}

private:
DISALLOW_COPY_AND_ASSIGN(InterpreterHandle);
};

} // namespace
Expand Down
4 changes: 2 additions & 2 deletions deps/v8/src/wasm/wasm-interpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<WasmInstanceObject> instance);
Expand Down Expand Up @@ -220,6 +218,8 @@ class V8_EXPORT_PRIVATE WasmInterpreter {
private:
Zone zone_;
std::unique_ptr<WasmInterpreterInternals> internals_;

DISALLOW_COPY_AND_ASSIGN(WasmInterpreter);
};

} // namespace wasm
Expand Down

0 comments on commit 28ca44c

Please sign in to comment.