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

Unified Diff: test/cctest/asmjs/test-asm-typer.cc

Issue 2526703002: [wasm] [asmjs] Route asm.js warnings to the dev console. (Closed)
Patch Set: merge 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/objects-inl.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/asmjs/test-asm-typer.cc
diff --git a/test/cctest/asmjs/test-asm-typer.cc b/test/cctest/asmjs/test-asm-typer.cc
index 3f6eeafa5ad615c4e03ae6783467c547a2838a2f..873e937420c08c56dfe5f37e9fdb8e7385760564 100644
--- a/test/cctest/asmjs/test-asm-typer.cc
+++ b/test/cctest/asmjs/test-asm-typer.cc
@@ -126,7 +126,8 @@ class AsmTyperHarnessBuilder {
WithGlobal(var_name, type);
auto* var_info = typer_->Lookup(DeclareVariable(var_name));
CHECK(var_info);
- var_info->SetFirstForwardUse(-1);
+ MessageLocation location;
+ var_info->SetFirstForwardUse(location);
return this;
}
@@ -260,12 +261,14 @@ class AsmTyperHarnessBuilder {
return false;
}
- if (std::strstr(typer_->error_message(), error_message) == nullptr) {
+ std::unique_ptr<char[]> msg = i::MessageHandler::GetLocalizedMessage(
+ isolate_, typer_->error_message());
+ if (std::strstr(msg.get(), error_message) == nullptr) {
std::cerr << "Asm validation failed with the wrong error message:\n"
"Expected to contain '"
<< error_message << "'\n"
" Actually is '"
- << typer_->error_message() << "'\n";
+ << msg.get() << "'\n";
return false;
}
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698