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

Side by Side Diff: src/shared/platform/nacl_log.c

Issue 997683002: Exit cleanly for the SRPC "log" requests instead of generating crash reports. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: run the hook just in case Created 5 years, 9 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
« no previous file with comments | « src/shared/platform/nacl_log.h ('k') | src/trusted/service_runtime/nacl_error_log_hook.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * NaCl Server Runtime logging code. 8 * NaCl Server Runtime logging code.
9 */ 9 */
10 #include "native_client/src/include/nacl_compiler_annotations.h" 10 #include "native_client/src/include/nacl_compiler_annotations.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 /* 345 /*
346 * run abort behavior only on edge transition when 346 * run abort behavior only on edge transition when
347 * g_abort_behavior_active is first set. 347 * g_abort_behavior_active is first set.
348 */ 348 */
349 } 349 }
350 NaClXMutexUnlock(&log_mu); 350 NaClXMutexUnlock(&log_mu);
351 if (run_abort_behavior) { 351 if (run_abort_behavior) {
352 #ifdef __COVERITY__ 352 #ifdef __COVERITY__
353 NaClAbort(); /* help coverity figure out that this is the default */ 353 NaClAbort(); /* help coverity figure out that this is the default */
354 #else 354 #else
355 (*gNaClLogAbortBehavior)(); 355 NaClLogRunAbortBehavior();
356 #endif 356 #endif
357 /* The abort behavior hook may not abort, so abort here in case. */
357 NaClAbort(); 358 NaClAbort();
358 } 359 }
359 break; 360 break;
360 default: 361 default:
361 /* 362 /*
362 * Abort handling code in turn aborted. Eeep! 363 * Abort handling code in turn aborted. Eeep!
363 */ 364 */
364 NaClAbort(); 365 NaClAbort();
365 break; 366 break;
366 } 367 }
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 va_start(ap, fmt); 710 va_start(ap, fmt);
710 NaClLogDoLogAndUnsetModuleV(detail_level, fmt, ap); 711 NaClLogDoLogAndUnsetModuleV(detail_level, fmt, ap);
711 va_end(ap); 712 va_end(ap);
712 } 713 }
713 714
714 void NaClLogSetAbortBehavior(void (*fn)(void)) { 715 void NaClLogSetAbortBehavior(void (*fn)(void)) {
715 NaClXMutexLock(&log_mu); 716 NaClXMutexLock(&log_mu);
716 gNaClLogAbortBehavior = fn; 717 gNaClLogAbortBehavior = fn;
717 NaClXMutexUnlock(&log_mu); 718 NaClXMutexUnlock(&log_mu);
718 } 719 }
720
721 void NaClLogRunAbortBehavior(void) {
722 (*gNaClLogAbortBehavior)();
723 }
OLDNEW
« no previous file with comments | « src/shared/platform/nacl_log.h ('k') | src/trusted/service_runtime/nacl_error_log_hook.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698