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

Unified Diff: base/containers/stack_container.h

Issue 311733002: Redo escaping in GN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 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 | third_party/mesa/BUILD.gn » ('j') | tools/gn/escape_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/containers/stack_container.h
diff --git a/base/containers/stack_container.h b/base/containers/stack_container.h
index f0106d73f212dbe3864e6166366ba9f595b7233c..87fa0369b6a4f9e05b3fc69c5ed9eab39247205b 100644
--- a/base/containers/stack_container.h
+++ b/base/containers/stack_container.h
@@ -90,6 +90,13 @@ class StackAllocator : public std::allocator<T> {
: source_(NULL) {
}
+ // This constructor must exist. It creates a default allocator that doesn't
+ // actually have a stack buffer. glibc's std::string() will compare the
+ // current allocator against the default-constructed allocator, so this
+ // should be fast.
+ StackAllocator() : source_(NULL) {
+ }
+
explicit StackAllocator(Source* source) : source_(source) {
}
« no previous file with comments | « no previous file | third_party/mesa/BUILD.gn » ('j') | tools/gn/escape_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698