| Index: src/wasm/module-decoder.cc
|
| diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
|
| index 5f9d710bf89eaa86813b02c889020823346539a9..652d277f53344849a6df2dc34575354fdabe4e0e 100644
|
| --- a/src/wasm/module-decoder.cc
|
| +++ b/src/wasm/module-decoder.cc
|
| @@ -245,7 +245,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);
|
| }
|
| }
|
|
|