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

Issue 2793903003: base: CommandLineFlags.Add need to parse out value (Closed)

Created:
3 years, 8 months ago by boliu
Modified:
3 years, 8 months ago
Reviewers:
jbudorick
CC:
chromium-reviews, danakj+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

base: CommandLineFlags.Add need to parse out value This is probably source of flakes where tests use @CommandLineFlags.Add("foo=bar"). Before this CL, the entire "foo=bar" string is used as the switch, and a value of null, but only if the java-only CommandLine instance is in use. So if any test tries to read the switch during start up, it's racy. Fix by parsing the command line in CommandLineFlags. BUG=689758 Review-Url: https://codereview.chromium.org/2793903003 Cr-Commit-Position: refs/heads/master@{#461534} Committed: https://chromium.googlesource.com/chromium/src/+/2b2e80acce1c253615137ccdd101e6c390458d23

Patch Set 1 #

Total comments: 3

Patch Set 2 : split(2) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java View 1 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 12 (7 generated)
boliu
ptal found this issue from https://codereview.chromium.org/2792873003/
3 years, 8 months ago (2017-04-03 18:31:50 UTC) #4
jbudorick
lgtm w/ nit https://codereview.chromium.org/2793903003/diff/1/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java (right): https://codereview.chromium.org/2793903003/diff/1/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java#newcode75 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java:75: String[] parsedFlags = flag.split("="); nit: split("=", ...
3 years, 8 months ago (2017-04-03 19:11:51 UTC) #5
boliu
https://codereview.chromium.org/2793903003/diff/1/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java (right): https://codereview.chromium.org/2793903003/diff/1/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java#newcode75 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java:75: String[] parsedFlags = flag.split("="); On 2017/04/03 19:11:51, jbudorick wrote: ...
3 years, 8 months ago (2017-04-03 19:40:43 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2793903003/20001
3 years, 8 months ago (2017-04-03 19:41:23 UTC) #9
commit-bot: I haz the power
3 years, 8 months ago (2017-04-03 21:01:41 UTC) #12
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/2b2e80acce1c253615137ccdd101...

Powered by Google App Engine
This is Rietveld 408576698