Commit fe00be43 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Remove wrong DCHECK

During instantiation, exceptions can be thrown when looking up the
imports, e.g. because of proxies. If the exception is thrown
internally, before actually calling out to JS code, it won't be
externally caught.
This CL removes the DCHECK that errornously checked that a pending
exception was externally caught.

R=mstarzinger@chromium.org

Bug: chromium:948228
Change-Id: Idbdb340167c1943f78397cc9b310ef5743755726
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547855Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60593}
parent cf81ce23
...@@ -255,7 +255,6 @@ void WasmEngine::AsyncInstantiate( ...@@ -255,7 +255,6 @@ void WasmEngine::AsyncInstantiate(
// We have to move the exception to the promise chain. // We have to move the exception to the promise chain.
Handle<Object> exception(isolate->pending_exception(), isolate); Handle<Object> exception(isolate->pending_exception(), isolate);
isolate->clear_pending_exception(); isolate->clear_pending_exception();
DCHECK(*isolate->external_caught_exception_address());
*isolate->external_caught_exception_address() = false; *isolate->external_caught_exception_address() = false;
resolver->OnInstantiationFailed(exception); resolver->OnInstantiationFailed(exception);
thrower.Reset(); thrower.Reset();
......
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
load('test/mjsunit/wasm/wasm-module-builder.js');
var {proxy, revoke} = Proxy.revocable({}, {});
revoke();
let builder = new WasmModuleBuilder();
builder.addImport('m', 'q', kSig_v_v);
WebAssembly.instantiate(builder.toModule(), proxy);
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