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

Issue 7273053: Base: Don't delete the previous command line when calling (Closed)

Created:
9 years, 5 months ago by rvargas (doing something else)
Modified:
9 years, 5 months ago
Reviewers:
msw, Evan Martin
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Base: Don't delete the previous command line when calling CommandLine::Init() In the multi-DLL build, we can end up initializing the object twice at startup (once in chrome.exe and once in chrome.dll). It should be harmless. BUG=76996 TEST=base_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=92380

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -1 line) Patch
M base/command_line.cc View 1 1 chunk +7 lines, -1 line 0 comments Download
M base/command_line_unittest.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
rvargas (doing something else)
9 years, 5 months ago (2011-06-28 22:52:24 UTC) #1
msw
Adding Evan. Can you explain the problem a little better for my benefit? http://codereview.chromium.org/7273053/diff/1/base/command_line.cc File ...
9 years, 5 months ago (2011-06-28 23:19:42 UTC) #2
rvargas (doing something else)
The problem is a race for the shared build on Windows (at least): We init ...
9 years, 5 months ago (2011-06-28 23:57:35 UTC) #3
msw
Hmm, this might be acceptable, since all the inits on Windows are presumably setting the ...
9 years, 5 months ago (2011-06-29 01:14:24 UTC) #4
rvargas (doing something else)
Evan, Cold you take a look?
9 years, 5 months ago (2011-07-11 18:47:45 UTC) #5
Evan Martin
I still don't quite understand. Why are we calling Init() more than once? Don't we ...
9 years, 5 months ago (2011-07-11 18:52:24 UTC) #6
rvargas (doing something else)
On 2011/07/11 18:52:24, Evan Martin wrote: > I still don't quite understand. Why are we ...
9 years, 5 months ago (2011-07-11 18:57:35 UTC) #7
Evan Martin
On 2011/07/11 18:57:35, rvargas wrote: > On 2011/07/11 18:52:24, Evan Martin wrote: > > I ...
9 years, 5 months ago (2011-07-11 19:03:15 UTC) #8
rvargas (doing something else)
9 years, 5 months ago (2011-07-11 22:35:35 UTC) #9
On 2011/07/11 19:03:15, Evan Martin wrote:
> On 2011/07/11 18:57:35, rvargas wrote:
> > On 2011/07/11 18:52:24, Evan Martin wrote:
> > > I still don't quite understand.  Why are we calling Init() more than once?

> > > Don't we just call it in WinMain()?
> > 
> > It is called from chrome.exe!wWinMain and chrome.dll!ChromeMain. The former
is
> > used for asynchronous breakpad initialization and the latter for everything
> > else.
> 
> Ah, I see.  And in the non-DLL case, the two modules end up with separate
copies
> of the CommandLine, but in the DLL case they end up sharing it?  If you don't

That's correct.


> mind, I'm gonna update the review description to summarize my understanding,
and
> let you fix it as you see fit.
> 
> LGTM

Thanks.

Powered by Google App Engine
This is Rietveld 408576698