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

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

Issue 2336233006: [wasm] C++ style: ErrorThrower& -> ErrorThrower* (Closed)
Patch Set: more Created 4 years, 3 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 | « no previous file | test/cctest/wasm/test-run-wasm-module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index e82ffcd4626ded3bdf65fae7ca6282ce9bfdd6d9..582e5eb07bad1ae6f6ee667c3981dc6e2c3d7121 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -484,24 +484,25 @@ WasmModule::WasmModule(byte* module_start)
pending_tasks(new base::Semaphore(0)) {}
static MaybeHandle<JSFunction> ReportFFIError(
- ErrorThrower& thrower, const char* error, uint32_t index,
+ ErrorThrower* thrower, const char* error, uint32_t index,
Handle<String> module_name, MaybeHandle<String> function_name) {
Handle<String> function_name_handle;
if (function_name.ToHandle(&function_name_handle)) {
- thrower.Error("Import #%d module=\"%.*s\" function=\"%.*s\" error: %s",
- index, module_name->length(), module_name->ToCString().get(),
- function_name_handle->length(),
- function_name_handle->ToCString().get(), error);
+ thrower->Error("Import #%d module=\"%.*s\" function=\"%.*s\" error: %s",
+ index, module_name->length(), module_name->ToCString().get(),
+ function_name_handle->length(),
+ function_name_handle->ToCString().get(), error);
} else {
- thrower.Error("Import #%d module=\"%.*s\" error: %s", index,
- module_name->length(), module_name->ToCString().get(), error);
+ thrower->Error("Import #%d module=\"%.*s\" error: %s", index,
+ module_name->length(), module_name->ToCString().get(),
+ error);
}
- thrower.Error("Import ");
+ thrower->Error("Import ");
return MaybeHandle<JSFunction>();
}
static MaybeHandle<JSReceiver> LookupFunction(
- ErrorThrower& thrower, Factory* factory, Handle<JSReceiver> ffi,
+ ErrorThrower* thrower, Factory* factory, Handle<JSReceiver> ffi,
uint32_t index, Handle<String> module_name,
MaybeHandle<String> function_name) {
if (ffi.is_null()) {
@@ -702,7 +703,7 @@ bool CompileWrappersToImportedFunctions(Isolate* isolate,
CHECK(param_count >= 0);
MaybeHandle<JSReceiver> function = LookupFunction(
- *thrower, isolate->factory(), ffi, index, module_name, function_name);
+ thrower, isolate->factory(), ffi, index, module_name, function_name);
if (function.is_null()) return false;
Handle<Code> code;
Handle<JSReceiver> target = function.ToHandleChecked();
@@ -760,10 +761,10 @@ bool CompileWrappersToImportedFunctions(Isolate* isolate,
void InitializeParallelCompilation(
Isolate* isolate, const std::vector<WasmFunction>& functions,
std::vector<compiler::WasmCompilationUnit*>& compilation_units,
- ModuleEnv& module_env, ErrorThrower& thrower) {
+ ModuleEnv& module_env, ErrorThrower* thrower) {
for (uint32_t i = FLAG_skip_compiling_wasm_funcs; i < functions.size(); ++i) {
compilation_units[i] = new compiler::WasmCompilationUnit(
- &thrower, isolate, &module_env, &functions[i], i);
+ thrower, isolate, &module_env, &functions[i], i);
}
}
@@ -852,7 +853,7 @@ void CompileInParallel(Isolate* isolate, const WasmModule* module,
// 1) The main thread allocates a compilation unit for each wasm function
// and stores them in the vector {compilation_units}.
InitializeParallelCompilation(isolate, module->functions, compilation_units,
- *module_env, *thrower);
+ *module_env, thrower);
// Objects for the synchronization with the background threads.
base::Mutex result_mutex;
« no previous file with comments | « no previous file | test/cctest/wasm/test-run-wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698