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

Side by Side Diff: base/debug/stack_trace.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
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 "base/debug/stack_trace.h" 5 #include "base/debug/stack_trace.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <sstream> 10 #include <sstream>
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 return depth; 257 return depth;
258 } 258 }
259 259
260 ScopedStackFrameLinker::ScopedStackFrameLinker(void* fp, void* parent_fp) 260 ScopedStackFrameLinker::ScopedStackFrameLinker(void* fp, void* parent_fp)
261 : fp_(fp), 261 : fp_(fp),
262 parent_fp_(parent_fp), 262 parent_fp_(parent_fp),
263 original_parent_fp_(LinkStackFrames(fp, parent_fp)) {} 263 original_parent_fp_(LinkStackFrames(fp, parent_fp)) {}
264 264
265 ScopedStackFrameLinker::~ScopedStackFrameLinker() { 265 ScopedStackFrameLinker::~ScopedStackFrameLinker() {
266 void* previous_parent_fp = LinkStackFrames(fp_, original_parent_fp_); 266 void* previous_parent_fp = LinkStackFrames(fp_, original_parent_fp_);
267 CHECK_EQ(parent_fp_, previous_parent_fp) 267 // Stack frame's parent pointer has changed!
268 << "Stack frame's parent pointer has changed!"; 268 CHECK_EQ(parent_fp_, previous_parent_fp);
269 } 269 }
270 270
271 #endif // HAVE_TRACE_STACK_FRAME_POINTERS 271 #endif // HAVE_TRACE_STACK_FRAME_POINTERS
272 272
273 } // namespace debug 273 } // namespace debug
274 } // namespace base 274 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698