[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: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47148}
This commit is contained in:
Deepti Gandluri 2017-08-03 15:15:45 -07:00 committed by Commit Bot
parent 8b865c8db4
commit 9735d7f109

View File

@ -1336,9 +1336,9 @@ int InstanceBuilder::ProcessImports(Handle<FixedArray> code_table,
}
if (imported_max_size > table.max_size) {
thrower_->LinkError(
"table import %d has maximum larger than maximum %d, "
"got %" PRIx64,
index, table.max_size, imported_max_size);
"memory import %d has a larger maximum size %" PRIx64
" than the module's declared maximum %u",
index, imported_max_size, table.max_size);
return -1;
}
}
@ -1404,8 +1404,9 @@ int InstanceBuilder::ProcessImports(Handle<FixedArray> code_table,
if (static_cast<uint32_t>(imported_max_pages) >
module_->max_mem_pages) {
thrower_->LinkError(
"memory import %d has larger maximum than maximum %u, got %d",
index, module_->max_mem_pages, imported_max_pages);
"memory import %d has a larger maximum size %u than the "
"module's declared maximum %u",
index, imported_max_pages, module_->max_mem_pages);
return -1;
}
}