summaryrefslogtreecommitdiffstats
path: root/base/containers/stack_container.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-05 17:19:03 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-05 17:19:03 +0000
commit97e39977482aaf3bcee30d64c632ad7272757a1d (patch)
tree6b36d45794e9e0f8a780652c24b21085ad73105d /base/containers/stack_container.h
parent47600beff0c5d467201cca76757e039e0a863fdb (diff)
downloadchromium_src-97e39977482aaf3bcee30d64c632ad7272757a1d.zip
chromium_src-97e39977482aaf3bcee30d64c632ad7272757a1d.tar.gz
chromium_src-97e39977482aaf3bcee30d64c632ad7272757a1d.tar.bz2
Redo escaping in GN.
This makes Windows escaping more correct and handles Posix shell characters better as well. Now there are completely different codepaths for Windows and Posix escaping. I removed JSON escaping since this is no longer needed now that we no longer write GYP files. I no longer have a separate SHELL and NINJA modes. Instead, I have pure NINJA mode for writing file names for Ninja to interpret, and NINKA_FORK mode which does NINJA escaping plus the correct platform-specific rules for the method Ninja uses for running build steps on the current system. Includes used to always be quoted ("-I../..") which was ugly. Now they're not quoted unless necessary (which is almost never). If it requires quoting, it will do -I"foo bar" which looks a bit odd but saves a bunch of special casing in the output code. Previously defines weren't quoted at all. Now they work like include dirs. Removed the convert_slashes flag on PathOutput which is no longer used. Removed some backslash special-casing in the unit tests on Windows. These are no longer necessary since we changed path output on Windows to use forward-slashes. Fix base's StackString on GCC. Previously this was only used on Windows-specific code. Fix mesa Windows GN build. BUG=358764 R=scottmg@chromium.org Review URL: https://codereview.chromium.org/311733002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275174 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/containers/stack_container.h')
-rw-r--r--base/containers/stack_container.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/containers/stack_container.h b/base/containers/stack_container.h
index f0106d7..87fa036 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) {
}