Re: [chromium-dev] Singleton shenanigans in base/time_win.cc causing problems (not the first time)

2009-11-23 Thread Paweł Hajdan Jr .
On Fri, Nov 20, 2009 at 23:34, Darin Fisher wrote: > We could define a function that must be called before you can use code in > base/. You could add a call to this everywhere that we currently create the > AtExitManager. Or, maybe we could combine those somehow. Thanks for the ideas! That in

Re: [chromium-dev] Singleton shenanigans in base/time_win.cc causing problems (not the first time)

2009-11-23 Thread Dan Kegel
On Sun, Nov 22, 2009 at 9:58 PM, Paweł Hajdan Jr. wrote: > What do you think? I think Singletons are evil, and am not surprised that they're causing trouble with tests. -- Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe:

Re: [chromium-dev] Singleton shenanigans in base/time_win.cc causing problems (not the first time)

2009-11-22 Thread Paweł Hajdan Jr .
On Mon, Nov 23, 2009 at 02:22, Marc-Antoine Ruel wrote: > It's really about the unit tests, not in chromium. > > I guess we could probably leak the singleton in the unit tests too on > each reset. Pawel, what do you think? > > Note to all the static local makers: you create an implicit atexit() >

Re: [chromium-dev] Singleton shenanigans in base/time_win.cc causing problems (not the first time)

2009-11-22 Thread Darin Fisher
We could define a function that must be called before you can use code in base/. You could add a call to this everywhere that we currently create the AtExitManager. Or, maybe we could combine those somehow. I don't think lazy initialization of stuff like this is all that valuable. It is complex

Re: [chromium-dev] Singleton shenanigans in base/time_win.cc causing problems (not the first time)

2009-11-22 Thread Marc-Antoine Ruel
It's really about the unit tests, not in chromium. I guess we could probably leak the singleton in the unit tests too on each reset. Pawel, what do you think? Note to all the static local makers: you create an implicit atexit() each time... Use a leaky singleton instead. M-A On Sun, Nov 22, 200

Re: [chromium-dev] Singleton shenanigans in base/time_win.cc causing problems (not the first time)

2009-11-22 Thread Peter Kasting
On Sun, Nov 22, 2009 at 4:28 PM, Mike Belshe wrote: > I think we should have a list of low-level functionality which we just > never cleanup. > > For the items you listed, I think you should leak them all. Trying to > cleanup these items creates complicated code and ultimately won't run any > be

Re: [chromium-dev] Singleton shenanigans in base/time_win.cc causing problems (not the first time)

2009-11-22 Thread Mike Belshe
I think we should have a list of low-level functionality which we just never cleanup. For the items you listed, I think you should leak them all. Trying to cleanup these items creates complicated code and ultimately won't run any better and possibly slower. Mike On Fri, Nov 20, 2009 at 1:44 P

[chromium-dev] Singleton shenanigans in base/time_win.cc causing problems (not the first time)

2009-11-20 Thread Paweł Hajdan Jr .
Do you have some idea how to get rid of the Singletons in base/time_win.cc? They don't play very well with base::SystemMonitor, MessageLoop, and test code. Here's the scenario we're hitting right now (in browser_tests): 1. HighResolutionTimerManager is created to enable high resolution timer unco