Updates:
Cc: [email protected]
Comment #8 on issue 8472 by [email protected]: Cannot go back to previous
page within a constrained window after doing a search
http://code.google.com/p/chromium/issues/detail?id=8472
I'm not sure relying on base::Singleton or LazyInstance is the right
approach either.
I think people tend to abuse global variables because they are convenient,
and
shutdown destruction is problematic for a lot of reasons. I don't know how
the
extension services works, but the best things I could see in this order are:
- A single extension object, stack or heap allocated in BrowserMain, and
explicitly
destructed / "shut down".
- If for some reason that couldn't work (although why?) and the extension
service
needs to initialize a bunch of global state, it should also clear that
state on shutdown.
- The above should happen automatically just by constructor/destruction of
some
single extension system object. If that's not possible, then maybe just
some static
method like ExtensionSystem::Shutdown() could be called at the end of
BrowserMain(),
or wherever else.
I think there are really only a few places we really should be using
Singleton /
LazyInstance. Those usually involve code (for example in base) which need
to be
lazily created, but whose lifetime and ownership are less clear. I don't
think the
extension system example fits this, it is in chrome/, and it should be
possible for
it to have a clear place for initialization / shutdown and lifetime /
ownership.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---