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

Unified Diff: runtime/bin/main.cc

Issue 348653002: Do not add '-p' and 'c' options to VM options, the VM flag processing (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
===================================================================
--- runtime/bin/main.cc (revision 37457)
+++ runtime/bin/main.cc (working copy)
@@ -436,19 +436,30 @@
break;
}
}
+ i++;
+ continue; // '-p' is not a VM flag so don't add to vm options.
} else if (strncmp(argv[i], kChecked, strlen(kChecked)) == 0) {
vm_options->AddArgument("--checked");
+ i++;
+ continue; // '-c' is not a VM flag so don't add to vm options.
} else if (!IsValidFlag(argv[i], kPrefix, kPrefixLen)) {
break;
}
+ // The following two flags are processed by both the embedder and
+ // the VM.
const char* kPrintFlags1 = "--print-flags";
const char* kPrintFlags2 = "--print_flags";
+ const char* kVerboseDebug1 = "--verbose_debug";
+ const char* kVerboseDebug2 = "--verbose-debug";
if ((strncmp(argv[i], kPrintFlags1, strlen(kPrintFlags1)) == 0) ||
(strncmp(argv[i], kPrintFlags2, strlen(kPrintFlags2)) == 0)) {
*print_flags_seen = true;
- }
- const char* kVerboseDebug = "--verbose_debug";
- if (strncmp(argv[i], kVerboseDebug, strlen(kVerboseDebug)) == 0) {
+ } else if ((strncmp(argv[i],
+ kVerboseDebug1,
+ strlen(kVerboseDebug1)) == 0) ||
+ (strncmp(argv[i],
+ kVerboseDebug2,
+ strlen(kVerboseDebug2)) == 0)) {
*verbose_debug_seen = true;
}
vm_options->AddArgument(argv[i]);
« 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