Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1034)

Unified Diff: src/wasm/wasm-result.cc

Issue 2421453002: [wasm] Implement {Compile,Runtime}Error; fix traps from start function (Closed)
Patch Set: Fix merge artefact Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/wasm-result.h ('k') | test/common/wasm/wasm-module-runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/wasm/wasm-result.h ('k') | test/common/wasm/wasm-module-runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698