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

Side by Side Diff: src/base/free_deleter.h

Issue 2248393002: Replace DumpBacktrace with Chromium's StackTrace implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Comments 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 | « src/base/debug/stack_trace_win.cc ('k') | src/base/logging.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Slightly adapted for inclusion in V8.
6 // Copyright 2016 the V8 project authors. All rights reserved.
7
8 #ifndef V8_BASE_FREE_DELETER_H_
9 #define V8_BASE_FREE_DELETER_H_
10
11 #include <stdlib.h>
12
13 namespace v8 {
14 namespace base {
15
16 // Function object which invokes 'free' on its parameter, which must be
17 // a pointer. Can be used to store malloc-allocated pointers in std::unique_ptr:
18 //
19 // std::unique_ptr<int, base::FreeDeleter> foo_ptr(
20 // static_cast<int*>(malloc(sizeof(int))));
21 struct FreeDeleter {
22 inline void operator()(void* ptr) const { free(ptr); }
23 };
24
25 } // namespace base
26 } // namespace v8
27
28 #endif // V8_BASE_FREE_DELETER_H_
OLDNEW
« no previous file with comments | « src/base/debug/stack_trace_win.cc ('k') | src/base/logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698