summaryrefslogtreecommitdiff
path: root/deps/v8/src/wasm
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-10-02 11:09:02 +0200
committerAnna Henningsen <anna@addaleax.net>2018-10-05 16:51:45 -0700
commit3f77720b63aebcaa1cae5ca30a172b0d122ac862 (patch)
tree97e285e5be687913c327e4273761c4ce067ec304 /deps/v8/src/wasm
parent2ba19ff2b8a6253c6fb7795f35d4fb1c30ec6c30 (diff)
downloadnode-new-3f77720b63aebcaa1cae5ca30a172b0d122ac862.tar.gz
deps: patch V8 to 7.0.276.24
Refs: https://github.com/v8/v8/compare/7.0.276.22...7.0.276.24 PR-URL: https://github.com/nodejs/node/pull/23158 Refs: https://github.com/nodejs/node/issues/23122 Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to 'deps/v8/src/wasm')
-rw-r--r--deps/v8/src/wasm/module-compiler.cc6
-rw-r--r--deps/v8/src/wasm/streaming-decoder.h9
2 files changed, 12 insertions, 3 deletions
diff --git a/deps/v8/src/wasm/module-compiler.cc b/deps/v8/src/wasm/module-compiler.cc
index b143b631a1..b950c590b5 100644
--- a/deps/v8/src/wasm/module-compiler.cc
+++ b/deps/v8/src/wasm/module-compiler.cc
@@ -2203,6 +2203,11 @@ std::shared_ptr<StreamingDecoder> AsyncCompileJob::CreateStreamingDecoder() {
AsyncCompileJob::~AsyncCompileJob() {
background_task_manager_.CancelAndWait();
if (native_module_) native_module_->compilation_state()->Abort();
+ // Tell the streaming decoder that the AsyncCompileJob is not available
+ // anymore.
+ // TODO(ahaas): Is this notification really necessary? Check
+ // https://crbug.com/888170.
+ if (stream_) stream_->NotifyCompilationEnded();
CancelPendingForegroundTask();
for (auto d : deferred_handles_) delete d;
}
@@ -2228,7 +2233,6 @@ void AsyncCompileJob::FinishCompile() {
}
void AsyncCompileJob::AsyncCompileFailed(Handle<Object> error_reason) {
- if (stream_) stream_->NotifyError();
// {job} keeps the {this} pointer alive.
std::shared_ptr<AsyncCompileJob> job =
isolate_->wasm_engine()->RemoveCompileJob(this);
diff --git a/deps/v8/src/wasm/streaming-decoder.h b/deps/v8/src/wasm/streaming-decoder.h
index 7b986bc28b..e14c32daf3 100644
--- a/deps/v8/src/wasm/streaming-decoder.h
+++ b/deps/v8/src/wasm/streaming-decoder.h
@@ -65,8 +65,13 @@ class V8_EXPORT_PRIVATE StreamingDecoder {
void Abort();
- // Notify the StreamingDecoder that there has been an compilation error.
- void NotifyError() { ok_ = false; }
+ // Notify the StreamingDecoder that compilation ended and the
+ // StreamingProcessor should not be called anymore.
+ void NotifyCompilationEnded() {
+ // We set {ok_} to false to turn all future calls to the StreamingDecoder
+ // into no-ops.
+ ok_ = false;
+ }
private:
// TODO(ahaas): Put the whole private state of the StreamingDecoder into the