Commit 9735d7f1 authored by Deepti Gandluri's avatar Deepti Gandluri Committed by Commit Bot

[wasm] Fix link error messages to be more indicative of the actual error

R=mtrofin@chromium.org

Change-Id: I665065b7e1161bcef6315a03083437410c574755
Reviewed-on: https://chromium-review.googlesource.com/601174
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47148}
parent 8b865c8d
...@@ -1336,9 +1336,9 @@ int InstanceBuilder::ProcessImports(Handle<FixedArray> code_table, ...@@ -1336,9 +1336,9 @@ int InstanceBuilder::ProcessImports(Handle<FixedArray> code_table,
} }
if (imported_max_size > table.max_size) { if (imported_max_size > table.max_size) {
thrower_->LinkError( thrower_->LinkError(
"table import %d has maximum larger than maximum %d, " "memory import %d has a larger maximum size %" PRIx64
"got %" PRIx64, " than the module's declared maximum %u",
index, table.max_size, imported_max_size); index, imported_max_size, table.max_size);
return -1; return -1;
} }
} }
...@@ -1404,8 +1404,9 @@ int InstanceBuilder::ProcessImports(Handle<FixedArray> code_table, ...@@ -1404,8 +1404,9 @@ int InstanceBuilder::ProcessImports(Handle<FixedArray> code_table,
if (static_cast<uint32_t>(imported_max_pages) > if (static_cast<uint32_t>(imported_max_pages) >
module_->max_mem_pages) { module_->max_mem_pages) {
thrower_->LinkError( thrower_->LinkError(
"memory import %d has larger maximum than maximum %u, got %d", "memory import %d has a larger maximum size %u than the "
index, module_->max_mem_pages, imported_max_pages); "module's declared maximum %u",
index, imported_max_pages, module_->max_mem_pages);
return -1; return -1;
} }
} }
......
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