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

Side by Side Diff: src/base/debug/stack_trace_posix.cc

Issue 2260543002: Fix gcc error for ignoring return value on stack_trace_posix.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Slightly adapted for inclusion in V8. 5 // Slightly adapted for inclusion in V8.
6 // Copyright 2016 the V8 project authors. All rights reserved. 6 // Copyright 2016 the V8 project authors. All rights reserved.
7 7
8 #include "src/base/debug/stack_trace.h" 8 #include "src/base/debug/stack_trace.h"
9 9
10 #include <errno.h> 10 #include <errno.h>
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 handler->HandleOutput(" ["); 168 handler->HandleOutput(" [");
169 OutputPointer(trace[i], handler); 169 OutputPointer(trace[i], handler);
170 handler->HandleOutput("]\n"); 170 handler->HandleOutput("]\n");
171 } 171 }
172 } 172 }
173 } 173 }
174 174
175 void PrintToStderr(const char* output) { 175 void PrintToStderr(const char* output) {
176 // NOTE: This code MUST be async-signal safe (it's used by in-process 176 // NOTE: This code MUST be async-signal safe (it's used by in-process
177 // stack dumping signal handler). NO malloc or stdio is allowed here. 177 // stack dumping signal handler). NO malloc or stdio is allowed here.
178 write(STDERR_FILENO, output, strlen(output)); 178 ssize_t return_val = write(STDERR_FILENO, output, strlen(output));
179 USE(return_val);
179 } 180 }
180 181
181 void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) { 182 void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) {
182 // NOTE: This code MUST be async-signal safe. 183 // NOTE: This code MUST be async-signal safe.
183 // NO malloc or stdio is allowed here. 184 // NO malloc or stdio is allowed here.
184 185
185 // Record the fact that we are in the signal handler now, so that the rest 186 // Record the fact that we are in the signal handler now, so that the rest
186 // of StackTrace can behave in an async-signal-safe manner. 187 // of StackTrace can behave in an async-signal-safe manner.
187 in_signal_handler = 1; 188 in_signal_handler = 1;
188 189
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 *start++ = ch; 437 *start++ = ch;
437 } 438 }
438 return buf; 439 return buf;
439 } 440 }
440 441
441 } // namespace internal 442 } // namespace internal
442 443
443 } // namespace debug 444 } // namespace debug
444 } // namespace base 445 } // namespace base
445 } // namespace v8 446 } // namespace v8
OLDNEW
« 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