| Index: ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc
|
| diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc b/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc
|
| index b27bad16590df8d456eb87dc6da9a7bb93c9116d..d51efe45f6ba57103377f2688154f32a48ccfbcb 100644
|
| --- a/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc
|
| +++ b/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc
|
| @@ -200,15 +200,25 @@ void PnaclTranslateThread::DoTranslate() {
|
| ¶ms,
|
| &data[0],
|
| data.size())) {
|
| - TranslateFailed(ERROR_PNACL_LLC_INTERNAL,
|
| - "Compile stream chunk failed.");
|
| - return;
|
| + if (llc_subprocess_->srpc_client()->GetLastError() !=
|
| + NACL_SRPC_RESULT_APP_ERROR) {
|
| + // If the error was reported by the translator, then we fall through
|
| + // and call StreamEnd, which returns a string describing the error,
|
| + // which we can then send to the Javascript console. Otherwise just
|
| + // fail here, since the translator has probably crashed or asserted.
|
| + TranslateFailed(ERROR_PNACL_LLC_INTERNAL,
|
| + "Compile stream chunk failed. "
|
| + "The PNaCl translator has probably crashed.");
|
| + return;
|
| + }
|
| + break;
|
| + } else {
|
| + PLUGIN_PRINTF(("StreamChunk Successful\n"));
|
| + core->CallOnMainThread(
|
| + 0,
|
| + coordinator_->GetCompileProgressCallback(data.size()),
|
| + PP_OK);
|
| }
|
| - PLUGIN_PRINTF(("StreamChunk Successful\n"));
|
| - core->CallOnMainThread(
|
| - 0,
|
| - coordinator_->GetCompileProgressCallback(data.size()),
|
| - PP_OK);
|
| } else {
|
| NaClXMutexUnlock(&cond_mu_);
|
| }
|
|
|