diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-07 02:21:15 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-07 02:21:15 +0000 |
commit | 4dd4224c9701c98a912bfd84dfcd24be2ce47d38 (patch) | |
tree | d4883c36bedc8ebd656052a169ea82492b2fa7d5 /chrome/browser/browser_main.cc | |
parent | 240faaf618d2247aa7da87fab9360cac95c3ba38 (diff) | |
download | chromium_src-4dd4224c9701c98a912bfd84dfcd24be2ce47d38.zip chromium_src-4dd4224c9701c98a912bfd84dfcd24be2ce47d38.tar.gz chromium_src-4dd4224c9701c98a912bfd84dfcd24be2ce47d38.tar.bz2 |
Linux: fix startup race between creating the SingletonLock and listening on SingletonSocket.
BUG=39922
TEST=see bug
Review URL: http://codereview.chromium.org/1612006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r-- | chrome/browser/browser_main.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 9d4b5c4..a993769 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -973,7 +973,14 @@ int BrowserMain(const MainFunctionParams& parameters) { if (CheckMachineLevelInstall()) return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; - process_singleton.Create(); + if (!process_singleton.Create()) { + LOG(ERROR) << "Failed to create a ProcessSingleton for your profile " + "directory. This means that running multiple instances " + "would start multiple browser processes rather than opening " + "a new window in the existing process. Aborting now to " + "avoid profile corruption."; + return ResultCodes::PROFILE_IN_USE; + } // Create the TranslateManager singleton. Singleton<TranslateManager>::get(); |