Commit e2e42338 authored by Emanuel Ziegler's avatar Emanuel Ziegler Committed by Commit Bot

[wasm] Allow throwing Wasm errors from Blink

Expose Wasm error classes to the V8 API such that they can be accessed
from embedding environments like Blink.

Follow-up in change I19568e6c0906de518fd6e5b417ef7e045e9d43c8

R=ahaas@chromium.org
R=ulan@chromium.org

Change-Id: I238288de73283a06c5075d0060977b366c0fbe09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2137416
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67068}
parent 29d188ae
......@@ -7180,6 +7180,9 @@ class V8_EXPORT Exception {
static Local<Value> ReferenceError(Local<String> message);
static Local<Value> SyntaxError(Local<String> message);
static Local<Value> TypeError(Local<String> message);
static Local<Value> WasmCompileError(Local<String> message);
static Local<Value> WasmLinkError(Local<String> message);
static Local<Value> WasmRuntimeError(Local<String> message);
static Local<Value> Error(Local<String> message);
/**
......
......@@ -9272,6 +9272,9 @@ DEFINE_ERROR(RangeError, range_error)
DEFINE_ERROR(ReferenceError, reference_error)
DEFINE_ERROR(SyntaxError, syntax_error)
DEFINE_ERROR(TypeError, type_error)
DEFINE_ERROR(WasmCompileError, wasm_compile_error)
DEFINE_ERROR(WasmLinkError, wasm_link_error)
DEFINE_ERROR(WasmRuntimeError, wasm_runtime_error)
DEFINE_ERROR(Error, error)
#undef DEFINE_ERROR
......
......@@ -895,6 +895,9 @@ class RuntimeCallTimer final {
V(Value_NumberValue) \
V(Value_TypeOf) \
V(Value_Uint32Value) \
V(WasmCompileError_New) \
V(WasmLinkError_New) \
V(WasmRuntimeError_New) \
V(WeakMap_Get) \
V(WeakMap_New) \
V(WeakMap_Set)
......
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