Commit d15687df authored by landell's avatar landell Committed by Commit bot

Print error message if dumping wasm file fails

BUG=

Review-Url: https://codereview.chromium.org/2806313002
Cr-Commit-Position: refs/heads/master@{#45007}
parent 07401684
......@@ -264,7 +264,10 @@ class ModuleDecoder : public Decoder {
result.ok() ? "ok" : "failed");
std::string name(buf);
if (FILE* wasm_file = base::OS::FOpen((path + name).c_str(), "wb")) {
fwrite(start_, end_ - start_, 1, wasm_file);
if (fwrite(start_, end_ - start_, 1, wasm_file) != 1) {
OFStream os(stderr);
os << "Error while dumping wasm file" << std::endl;
}
fclose(wasm_file);
}
}
......
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