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

Unified Diff: tools/pnacl-llc/SRPCStreamer.h

Issue 23753003: Report fatal translator errors to the browser (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: split errors from streamable readBytes and Header ReadPrefix Created 7 years, 3 months 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 | « lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp ('k') | tools/pnacl-llc/SRPCStreamer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/pnacl-llc/SRPCStreamer.h
diff --git a/tools/pnacl-llc/SRPCStreamer.h b/tools/pnacl-llc/SRPCStreamer.h
index 805552be1f47a6b94f267e1dc128bc4effea0f54..bde86e5d9f0ac634a03e2d48be4a988e8101f018 100644
--- a/tools/pnacl-llc/SRPCStreamer.h
+++ b/tools/pnacl-llc/SRPCStreamer.h
@@ -98,11 +98,12 @@ public:
size_t gotChunk(unsigned char *bytes, size_t len);
// Called by the RPC thread. Wait for the compilation thread to finish.
int streamEnd(std::string *ErrMsg);
- // Called by the compilation thread. Signal that there was a compilation
- // error so the RPC thread can abort the stream.
- void setError() { Error = true; }
+ // Called by the compilation thread. Set the error condition and also
+ // terminate the thread.
+ void setFatalError(const std::string& message);
private:
- bool Error;
+ int Error;
+ std::string ErrorMessage;
QueueStreamer Q;
pthread_t CompileThread;
};
« no previous file with comments | « lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp ('k') | tools/pnacl-llc/SRPCStreamer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698