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

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

Issue 2575313002: [promisehook] Implement PromiseHook (Closed)
Patch Set: rebase + add comments Created 4 years 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/runtime/runtime-promise.cc ('k') | test/cctest/test-api.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 cc9fcd1f40b8d45efa767180834e9594d52caccb..24555cb26aec7510a1aad935bcf86e744a1767d3 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -1392,8 +1392,7 @@ class WasmInstanceBuilder {
// Helper routines to print out errors with imports.
void ReportLinkError(const char* error, uint32_t index,
- Handle<String> module_name,
- Handle<String> import_name) {
+ Handle<String> module_name, Handle<String> import_name) {
thrower_->LinkError(
"Import #%d module=\"%.*s\" function=\"%.*s\" error: %s", index,
module_name->length(), module_name->ToCString().get(),
@@ -1431,7 +1430,7 @@ class WasmInstanceBuilder {
// Look up the value in the module.
if (!module->IsJSReceiver()) {
return ReportTypeError("module is not an object or function", index,
- module_name);
+ module_name);
}
result = Object::GetPropertyOrElement(module, import_name);
@@ -1522,17 +1521,15 @@ class WasmInstanceBuilder {
WasmImport& import = module_->import_table[index];
Handle<String> module_name;
- MaybeHandle<String> maybe_module_name =
- ExtractStringFromModuleBytes(isolate_, compiled_module_,
- import.module_name_offset,
- import.module_name_length);
+ MaybeHandle<String> maybe_module_name = ExtractStringFromModuleBytes(
+ isolate_, compiled_module_, import.module_name_offset,
+ import.module_name_length);
if (!maybe_module_name.ToHandle(&module_name)) return -1;
Handle<String> import_name;
- MaybeHandle<String> maybe_import_name =
- ExtractStringFromModuleBytes(isolate_, compiled_module_,
- import.field_name_offset,
- import.field_name_length);
+ MaybeHandle<String> maybe_import_name = ExtractStringFromModuleBytes(
+ isolate_, compiled_module_, import.field_name_offset,
+ import.field_name_length);
if (!maybe_import_name.ToHandle(&import_name)) return -1;
MaybeHandle<Object> result =
@@ -1555,8 +1552,8 @@ class WasmInstanceBuilder {
module_->origin);
if (import_wrapper.is_null()) {
ReportLinkError(
- "imported function does not match the expected type",
- index, module_name, import_name);
+ "imported function does not match the expected type", index,
+ module_name, import_name);
return -1;
}
code_table->set(num_imported_functions, *import_wrapper);
@@ -1630,8 +1627,8 @@ class WasmInstanceBuilder {
// Global imports are converted to numbers and written into the
// {globals_} array buffer.
if (!value->IsNumber()) {
- ReportLinkError("global import must be a number",
- index, module_name, import_name);
+ ReportLinkError("global import must be a number", index,
+ module_name, import_name);
return -1;
}
WriteGlobalValue(module_->globals[import.index], value);
« no previous file with comments | « src/runtime/runtime-promise.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698