diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-19 07:19:20 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-19 07:19:20 +0000 |
commit | d8a3df404352a9add7ff4bd95835ab0d07fecdd8 (patch) | |
tree | f6fc8f432f2daab87bbe46659548a4e1b141f798 /ppapi/native_client | |
parent | 84e0de0837233d572d195b4bac02edb222edc943 (diff) | |
download | chromium_src-d8a3df404352a9add7ff4bd95835ab0d07fecdd8.zip chromium_src-d8a3df404352a9add7ff4bd95835ab0d07fecdd8.tar.gz chromium_src-d8a3df404352a9add7ff4bd95835ab0d07fecdd8.tar.bz2 |
Revert 147401 - Merge branch 'master' of http://git.chromium.org/chromium/src into mywork
Collect NaClLog messages from just prior to crash and display in JavaScript console.
Test command line, after building chrome:
NACLVERBOSITY=6 NACL_PLUGIN_DEBUG=1 NACL_FAULT_INJECTION=BeforeLoadIrt=GF2 out/Release/chrome --user-data-dir=/tmp/udd
This causes the service runtime to abort just prior to loading the
IRT. After this "crash", open up the JavaScript console and see the
log messages, including those from the fault injection library.
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2776
TEST= manual, using the fault injection library
Review URL: https://chromiumcodereview.appspot.com/10806005
TBR=bsy@google.com
Review URL: https://chromiumcodereview.appspot.com/10800032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147408 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
4 files changed, 0 insertions, 42 deletions
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc index 496f135..8a88489 100644 --- a/ppapi/native_client/src/trusted/plugin/plugin.cc +++ b/ppapi/native_client/src/trusted/plugin/plugin.cc @@ -1146,28 +1146,6 @@ void Plugin::NexeFileDidOpenContinuation(int32_t pp_error) { NaClLog(4, "Leaving NexeFileDidOpenContinuation\n"); } -static void LogLineToConsole(Plugin* plugin, nacl::string one_line) { - PLUGIN_PRINTF(("LogLineToConsole: %s\n", - one_line.c_str())); - plugin->AddToConsole(one_line); -} - -void Plugin::CopyCrashLogToJsConsole() { - nacl::string fatal_msg(main_service_runtime()->GetCrashLogOutput()); - size_t ix_start = 0; - size_t ix_end; - - PLUGIN_PRINTF(("Plugin::CopyCrashLogToJsConsole: got %d bytes\n", - fatal_msg.size())); - while (nacl::string::npos != (ix_end = fatal_msg.find('\n', ix_start))) { - LogLineToConsole(this, fatal_msg.substr(ix_start, ix_end - ix_start)); - ix_start = ix_end + 1; - } - if (ix_start != fatal_msg.size()) { - LogLineToConsole(this, fatal_msg.substr(ix_start)); - } -} - void Plugin::NexeDidCrash(int32_t pp_error) { PLUGIN_PRINTF(("Plugin::NexeDidCrash (pp_error=%"NACL_PRId32")\n", pp_error)); @@ -1194,7 +1172,6 @@ void Plugin::NexeDidCrash(int32_t pp_error) { " suppressing\n")); return; } - if (nacl_ready_state() == DONE) { ReportDeadNexe(); } else { @@ -1203,8 +1180,6 @@ void Plugin::NexeDidCrash(int32_t pp_error) { "Nexe crashed during startup"); ReportLoadError(error_info); } - - CopyCrashLogToJsConsole(); } void Plugin::BitcodeDidTranslate(int32_t pp_error) { diff --git a/ppapi/native_client/src/trusted/plugin/plugin.h b/ppapi/native_client/src/trusted/plugin/plugin.h index ce6df11..253cfd5 100644 --- a/ppapi/native_client/src/trusted/plugin/plugin.h +++ b/ppapi/native_client/src/trusted/plugin/plugin.h @@ -418,12 +418,6 @@ class Plugin : public pp::InstancePrivate { // Shuts down the proxy for PPAPI nexes. void ShutdownProxy(); // Nexe shutdown + proxy deletion. - // Copy the main service runtime's most recent NaClLog output to the - // JavaScript console. Valid to use only after a crash, e.g., via a - // detail level LOG_FATAL NaClLog entry. If the crash was not due - // to a LOG_FATAL this method will do nothing. - void CopyCrashLogToJsConsole(); - ScriptablePlugin* scriptable_plugin_; int argc_; diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.cc b/ppapi/native_client/src/trusted/plugin/service_runtime.cc index 76fb5789..5c3b4fd 100644 --- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc @@ -412,7 +412,6 @@ void PluginReverseInterface::CloseManifestEntry_MainThreadContinuation( void PluginReverseInterface::ReportCrash() { NaClLog(4, "PluginReverseInterface::ReportCrash\n"); - if (crash_cb_.pp_completion_callback().func != NULL) { NaClLog(4, "PluginReverseInterface::ReportCrash: invoking CB\n"); pp::Module::Get()->core()->CallOnMainThread(0, crash_cb_, PP_OK); @@ -742,12 +741,4 @@ void ServiceRuntime::set_exit_status(int exit_status) { exit_status_ = exit_status & 0xff; } -nacl::string ServiceRuntime::GetCrashLogOutput() { - if (NULL != subprocess_.get()) { - return subprocess_->GetCrashLogOutput(); - } else { - return ""; - } -} - } // namespace plugin diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.h b/ppapi/native_client/src/trusted/plugin/service_runtime.h index 5af0c51..554942a 100644 --- a/ppapi/native_client/src/trusted/plugin/service_runtime.h +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.h @@ -235,8 +235,6 @@ class ServiceRuntime { int exit_status(); // const, but grabs mutex etc. void set_exit_status(int exit_status); - nacl::string GetCrashLogOutput(); - // To establish quota callbacks the pnacl coordinator needs to communicate // with the reverse interface. PluginReverseInterface* rev_interface() const { return rev_interface_; } |