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

Unified Diff: src/flags.cc

Issue 221913004: Allow flags strings in quotes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/flags.cc
diff --git a/src/flags.cc b/src/flags.cc
index 8e42206c59922ddad20c4422d7b7b718f20a833d..717bf55b7c9a1a8b386c0a66ab33900774a020a8 100644
--- a/src/flags.cc
+++ b/src/flags.cc
@@ -499,6 +499,12 @@ static char* SkipBlackSpace(char* p) {
// static
int FlagList::SetFlagsFromString(const char* str, int len) {
+ // The string might be in quotes. Skip the quotes.
+ if (len >= 2 && (str[0] == '\'' || str[0] == '"') && str[0] == str[len - 1]) {
+ ++str;
+ len -= 2;
+ }
+
// make a 0-terminated copy of str
ScopedVector<char> copy0(len + 1);
OS::MemCopy(copy0.start(), str, len);
« 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