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

Unified Diff: components/nacl/loader/nacl_listener.cc

Issue 1179523002: NaCl: Clean up error handling during NaCl loader startup in OnStart() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_listener.cc
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc
index c7352f2810fb5d8986b977c8f691123aafe7d6e0..defd931e654e9abc9d5ba8fd60042d9adaef8628 100644
--- a/components/nacl/loader/nacl_listener.cc
+++ b/components/nacl/loader/nacl_listener.cc
@@ -328,8 +328,7 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
#if defined(OS_LINUX) || defined(OS_MACOSX)
int urandom_fd = dup(base::GetUrandomFD());
if (urandom_fd < 0) {
- LOG(ERROR) << "Failed to dup() the urandom FD";
- return;
+ LOG(FATAL) << "Failed to dup() the urandom FD";
}
NaClChromeMainSetUrandomFd(urandom_fd);
#endif
@@ -344,8 +343,7 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
nap = NaClAppCreate();
if (nap == NULL) {
- LOG(ERROR) << "NaClAppCreate() failed";
- return;
+ LOG(FATAL) << "NaClAppCreate() failed";
}
IPC::ChannelHandle browser_handle;
@@ -383,12 +381,11 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
ppapi_renderer_handle,
trusted_listener_->TakeClientChannelHandle(),
manifest_service_handle)))
- LOG(ERROR) << "Failed to send IPC channel handle to NaClProcessHost.";
+ LOG(FATAL) << "Failed to send IPC channel handle to NaClProcessHost.";
struct NaClChromeMainArgs* args = NaClChromeMainArgsCreate();
if (args == NULL) {
- LOG(ERROR) << "NaClChromeMainArgsCreate() failed";
- return;
+ LOG(FATAL) << "NaClChromeMainArgsCreate() failed";
}
#if defined(OS_LINUX) || defined(OS_MACOSX)
@@ -409,8 +406,7 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
args->irt_fd = _open_osfhandle(reinterpret_cast<intptr_t>(irt_handle),
_O_RDONLY | _O_BINARY);
if (args->irt_fd < 0) {
- LOG(ERROR) << "_open_osfhandle() failed";
- return;
+ LOG(FATAL) << "_open_osfhandle() failed";
}
#else
args->irt_fd = irt_handle;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698