Index: ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.cc |
=================================================================== |
--- ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.cc (revision 212679) |
+++ ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.cc (working copy) |
@@ -6,6 +6,8 @@ |
#include "ppapi/native_client/src/trusted/plugin/nacl_entry_points.h" |
#include "ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.h" |
+#include "ppapi/cpp/var.h" |
+ |
LaunchNaClProcessFunc launch_nacl_process = NULL; |
namespace plugin { |
@@ -21,9 +23,12 @@ |
bool uses_ppapi, |
bool enable_ppapi_dev, |
bool enable_dyncode_syscalls, |
- bool enable_exception_handling) { |
+ bool enable_exception_handling, |
+ nacl::string* error_message) { |
+ *error_message = ""; |
if (!launch_nacl_process) |
return false; |
+ PP_Var var_error_message; |
// send a synchronous message to the browser process |
if (launch_nacl_process(instance, |
url, |
@@ -32,7 +37,12 @@ |
PP_FromBool(enable_ppapi_dev), |
PP_FromBool(enable_dyncode_syscalls), |
PP_FromBool(enable_exception_handling), |
- &channel_) != PP_NACL_OK) { |
+ &channel_, |
+ &var_error_message) != PP_NACL_OK) { |
+ pp::Var var_error_message_cpp(pp::PASS_REF, var_error_message); |
+ if (var_error_message_cpp.is_string()) { |
+ *error_message = var_error_message_cpp.AsString(); |
+ } |
return false; |
} |
return true; |