OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ppapi/native_client/src/trusted/plugin/plugin.h" | 5 #include "ppapi/native_client/src/trusted/plugin/plugin.h" |
6 | 6 |
7 #include <sys/stat.h> | 7 #include <sys/stat.h> |
8 #include <sys/types.h> | 8 #include <sys/types.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 } | 388 } |
389 | 389 |
390 void Plugin::NexeDidCrash(int32_t pp_error) { | 390 void Plugin::NexeDidCrash(int32_t pp_error) { |
391 PLUGIN_PRINTF(("Plugin::NexeDidCrash (pp_error=%" NACL_PRId32 ")\n", | 391 PLUGIN_PRINTF(("Plugin::NexeDidCrash (pp_error=%" NACL_PRId32 ")\n", |
392 pp_error)); | 392 pp_error)); |
393 if (pp_error != PP_OK) { | 393 if (pp_error != PP_OK) { |
394 PLUGIN_PRINTF(("Plugin::NexeDidCrash: CallOnMainThread callback with" | 394 PLUGIN_PRINTF(("Plugin::NexeDidCrash: CallOnMainThread callback with" |
395 " non-PP_OK arg -- SHOULD NOT HAPPEN\n")); | 395 " non-PP_OK arg -- SHOULD NOT HAPPEN\n")); |
396 } | 396 } |
397 | 397 |
398 std::string crash_log = | 398 nacl_interface_->NexeDidCrash(pp_instance()); |
399 main_subprocess_.service_runtime()->GetCrashLogOutput(); | |
400 nacl_interface_->NexeDidCrash(pp_instance(), crash_log.c_str()); | |
401 } | 399 } |
402 | 400 |
403 void Plugin::BitcodeDidTranslate(int32_t pp_error) { | 401 void Plugin::BitcodeDidTranslate(int32_t pp_error) { |
404 PLUGIN_PRINTF(("Plugin::BitcodeDidTranslate (pp_error=%" NACL_PRId32 ")\n", | 402 PLUGIN_PRINTF(("Plugin::BitcodeDidTranslate (pp_error=%" NACL_PRId32 ")\n", |
405 pp_error)); | 403 pp_error)); |
406 if (pp_error != PP_OK) { | 404 if (pp_error != PP_OK) { |
407 // Error should have been reported by pnacl. Just return. | 405 // Error should have been reported by pnacl. Just return. |
408 PLUGIN_PRINTF(("Plugin::BitcodeDidTranslate error in Pnacl\n")); | 406 PLUGIN_PRINTF(("Plugin::BitcodeDidTranslate error in Pnacl\n")); |
409 return; | 407 return; |
410 } | 408 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 | 501 |
504 void Plugin::SetExitStatusOnMainThread(int32_t pp_error, | 502 void Plugin::SetExitStatusOnMainThread(int32_t pp_error, |
505 int exit_status) { | 503 int exit_status) { |
506 DCHECK(pp::Module::Get()->core()->IsMainThread()); | 504 DCHECK(pp::Module::Get()->core()->IsMainThread()); |
507 DCHECK(nacl_interface_); | 505 DCHECK(nacl_interface_); |
508 nacl_interface_->SetExitStatus(pp_instance(), exit_status); | 506 nacl_interface_->SetExitStatus(pp_instance(), exit_status); |
509 } | 507 } |
510 | 508 |
511 | 509 |
512 } // namespace plugin | 510 } // namespace plugin |
OLD | NEW |