From 6036726eb981b6c4b42047513b9d3f4ac865daac Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 24 Oct 2018 11:30:15 +0200 Subject: BASELINE: Update Chromium to 70.0.3538.78 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie634710bf039e26c1957f4ae45e101bd4c434ae7 Reviewed-by: Michael BrĂ¼ning --- chromium/v8/src/wasm/wasm-engine.cc | 190 ++++++++++++++++++++++++------------ 1 file changed, 129 insertions(+), 61 deletions(-) (limited to 'chromium/v8/src/wasm/wasm-engine.cc') diff --git a/chromium/v8/src/wasm/wasm-engine.cc b/chromium/v8/src/wasm/wasm-engine.cc index 717c5defd79..4f772d9bdd3 100644 --- a/chromium/v8/src/wasm/wasm-engine.cc +++ b/chromium/v8/src/wasm/wasm-engine.cc @@ -8,10 +8,11 @@ #include "src/compilation-statistics.h" #include "src/objects-inl.h" #include "src/objects/js-promise.h" +#include "src/wasm/function-compiler.h" #include "src/wasm/module-compiler.h" #include "src/wasm/module-decoder.h" #include "src/wasm/streaming-decoder.h" -#include "src/wasm/wasm-objects.h" +#include "src/wasm/wasm-objects-inl.h" namespace v8 { namespace internal { @@ -20,13 +21,18 @@ namespace wasm { WasmEngine::WasmEngine() : code_manager_(&memory_tracker_, kMaxWasmCodeMemory) {} -WasmEngine::~WasmEngine() = default; +WasmEngine::~WasmEngine() { + // All AsyncCompileJobs have been canceled. + DCHECK(jobs_.empty()); +} -bool WasmEngine::SyncValidate(Isolate* isolate, const ModuleWireBytes& bytes) { +bool WasmEngine::SyncValidate(Isolate* isolate, const WasmFeatures& enabled, + const ModuleWireBytes& bytes) { // TODO(titzer): remove dependency on the isolate. if (bytes.start() == nullptr || bytes.length() == 0) return false; - ModuleResult result = SyncDecodeWasmModule(isolate, bytes.start(), - bytes.end(), true, kWasmOrigin); + ModuleResult result = + DecodeWasmModule(enabled, bytes.start(), bytes.end(), true, kWasmOrigin, + isolate->counters(), allocator()); return result.ok(); } @@ -34,20 +40,24 @@ MaybeHandle WasmEngine::SyncCompileTranslatedAsmJs( Isolate* isolate, ErrorThrower* thrower, const ModuleWireBytes& bytes, Handle