| Index: src/wasm/wasm-result.cc
|
| diff --git a/src/wasm/wasm-result.cc b/src/wasm/wasm-result.cc
|
| index 7d251f03dfc884f19df22ca731bf800b15718a22..6d535e3f576a87fa093d1af9a482ca39c9ed6772 100644
|
| --- a/src/wasm/wasm-result.cc
|
| +++ b/src/wasm/wasm-result.cc
|
| @@ -46,28 +46,35 @@ void ErrorThrower::Format(i::Handle<i::JSFunction> constructor,
|
| exception_ = isolate_->factory()->NewError(constructor, message);
|
| }
|
|
|
| -void ErrorThrower::Error(const char* format, ...) {
|
| +void ErrorThrower::TypeError(const char* format, ...) {
|
| if (error()) return;
|
| va_list arguments;
|
| va_start(arguments, format);
|
| - Format(isolate_->error_function(), format, arguments);
|
| + Format(isolate_->type_error_function(), format, arguments);
|
| va_end(arguments);
|
| }
|
|
|
| -void ErrorThrower::TypeError(const char* format, ...) {
|
| +void ErrorThrower::RangeError(const char* format, ...) {
|
| if (error()) return;
|
| va_list arguments;
|
| va_start(arguments, format);
|
| - Format(isolate_->type_error_function(), format, arguments);
|
| + Format(isolate_->range_error_function(), format, arguments);
|
| va_end(arguments);
|
| }
|
|
|
| -void ErrorThrower::RangeError(const char* format, ...) {
|
| +void ErrorThrower::CompileError(const char* format, ...) {
|
| if (error()) return;
|
| va_list arguments;
|
| va_start(arguments, format);
|
| - CHECK(*isolate_->range_error_function() != *isolate_->type_error_function());
|
| - Format(isolate_->range_error_function(), format, arguments);
|
| + Format(isolate_->wasm_compile_error_function(), format, arguments);
|
| + va_end(arguments);
|
| +}
|
| +
|
| +void ErrorThrower::RuntimeError(const char* format, ...) {
|
| + if (error()) return;
|
| + va_list arguments;
|
| + va_start(arguments, format);
|
| + Format(isolate_->wasm_runtime_error_function(), format, arguments);
|
| va_end(arguments);
|
| }
|
|
|
|
|