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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/plugin.cc

Issue 424893003: Pepper: Move NaCl fatal logging to Chrome IPC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix race condition on plugin process exit Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698