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

Issue 1052833003: First attempt to capture parser/translation errors in browser. (Closed)

Created:
5 years, 8 months ago by Karl
Modified:
5 years, 8 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

First attempt to capture parser/translation errors in browser. Adds a notion of an (optional) error stream to the existing log and emit streams. If not specified, the log stream is used. Error messages in parser/translation are sent to this new error stream. In the browser compiler server, a separate error (string) stream is created to capture errors. Method onEndCallBack returns the contents of the error stream (if non-empty) instead of a generic error message. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4138

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fix issues in patch set 1. #

Patch Set 3 : Require that log, emit, and error streams are defined. #

Patch Set 4 : Fix nit. #

Total comments: 4

Patch Set 5 : Fix nits and syntax errors. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -15 lines) Patch
M src/IceBrowserCompileServer.h View 1 2 3 4 3 chunks +15 lines, -0 lines 0 comments Download
M src/IceBrowserCompileServer.cpp View 1 2 3 4 2 chunks +6 lines, -2 lines 0 comments Download
M src/IceCompileServer.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/IceGlobalContext.h View 1 2 3 3 chunks +11 lines, -6 lines 0 comments Download
M src/IceGlobalContext.cpp View 1 2 2 chunks +8 lines, -4 lines 0 comments Download
M src/PNaClTranslator.cpp View 1 chunk +1 line, -1 line 0 comments Download
M unittest/BitcodeMunge.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (1 generated)
Karl
5 years, 8 months ago (2015-04-17 15:47:09 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/1052833003/diff/1/src/IceBrowserCompileServer.cpp File src/IceBrowserCompileServer.cpp (right): https://codereview.chromium.org/1052833003/diff/1/src/IceBrowserCompileServer.cpp#newcode85 src/IceBrowserCompileServer.cpp:85: if (ErrorStream) { ErrorStream *should* be non-null at this ...
5 years, 8 months ago (2015-04-17 18:15:10 UTC) #3
Karl
I also made all three streams be defined when calling constructor GlobalContext. https://codereview.chromium.org/1052833003/diff/1/src/IceBrowserCompileServer.cpp File src/IceBrowserCompileServer.cpp ...
5 years, 8 months ago (2015-04-17 21:33:52 UTC) #4
jvoung (off chromium)
Otherwise LGTM https://codereview.chromium.org/1052833003/diff/60001/src/IceBrowserCompileServer.cpp File src/IceBrowserCompileServer.cpp (right): https://codereview.chromium.org/1052833003/diff/60001/src/IceBrowserCompileServer.cpp#newcode86 src/IceBrowserCompileServer.cpp:86: return strdup(Message); remove the dup'ed strdup: "return ...
5 years, 8 months ago (2015-04-20 21:41:57 UTC) #5
native-client-reviews_googlegroups.com
Jan, I guess I no longer understand Makefile.standalone. How do I build and test the ...
5 years, 8 months ago (2015-04-20 22:10:38 UTC) #6
jvoung (off chromium)
Okay, so that's why your compiler didn't catch some of these things. I didn't make ...
5 years, 8 months ago (2015-04-20 22:49:47 UTC) #7
native-client-reviews_googlegroups.com
Jan, After talking to Derek, it appears that I need to use toolchain_build_pnacl.py. Will fix ...
5 years, 8 months ago (2015-04-20 22:49:55 UTC) #8
jvoung (off chromium)
Right, if you do "toolchain_build_pnacl.py --build-sbtc sandboxed_translators --install ..." It will also build the thing ...
5 years, 8 months ago (2015-04-20 22:55:51 UTC) #9
Karl
5 years, 8 months ago (2015-04-22 22:23:50 UTC) #10
Committed as 2f67b929c15a30d5ed43b9929cac95a96fec0bbe

Closing...

https://codereview.chromium.org/1052833003/diff/60001/src/IceBrowserCompileSe...
File src/IceBrowserCompileServer.cpp (right):

https://codereview.chromium.org/1052833003/diff/60001/src/IceBrowserCompileSe...
src/IceBrowserCompileServer.cpp:86: return strdup(Message);
On 2015/04/20 21:41:57, jvoung wrote:
> remove the dup'ed strdup: "return strdup(Message);"

Done.

https://codereview.chromium.org/1052833003/diff/60001/src/IceBrowserCompileSe...
File src/IceBrowserCompileServer.h (right):

https://codereview.chromium.org/1052833003/diff/60001/src/IceBrowserCompileSe...
src/IceBrowserCompileServer.h:81: std::string getContents() { return
StrBuf.str(); }
On 2015/04/20 21:41:57, jvoung wrote:
> Might be able to return a reference to the string instead? Const also?
> 
> IceString?

Done.

Powered by Google App Engine
This is Rietveld 408576698