diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 20:01:14 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 20:01:14 +0000 |
commit | 5a9b083b725c8f9b40ad53ad6cc0f97e8f6d211b (patch) | |
tree | 2df2699d3af4edf6bd479e113b8ab88e391d522a /chrome/app | |
parent | 6721c94f623189fe6a68ee100e6e7aa1a2a306b4 (diff) | |
download | chromium_src-5a9b083b725c8f9b40ad53ad6cc0f97e8f6d211b.zip chromium_src-5a9b083b725c8f9b40ad53ad6cc0f97e8f6d211b.tar.gz chromium_src-5a9b083b725c8f9b40ad53ad6cc0f97e8f6d211b.tar.bz2 |
exit from main instead of returning. Defeats tail call optimization that
makes it look like start calls ChromeMain directly, because nobody's got
symbols for start.
BUG=39232
TEST=Breakpad reports should show thread 0 beginning in main
Review URL: http://codereview.chromium.org/1457001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42803 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r-- | chrome/app/chrome_exe_main.mm | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/chrome/app/chrome_exe_main.mm b/chrome/app/chrome_exe_main.mm index 53b546e..5594282 100644 --- a/chrome/app/chrome_exe_main.mm +++ b/chrome/app/chrome_exe_main.mm @@ -1,18 +1,20 @@ -// Copyright (c) 2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// The entry point for all invocations of Chromium, browser and renderer. On -// windows, this does nothing but load chrome.dll and invoke its entry point -// in order to make it easy to update the app from GoogleUpdate. We don't need -// that extra layer with Keystone on the Mac, though we may run into issues -// with Keychain prompts unless we sign the application. That shouldn't be -// too hard, we just need infrastructure support to do it. +// The entry point for all Mac Chromium processes, including the outer app +// bundle (browser) and helper app (renderer, plugin, and friends). + +#include <stdlib.h> extern "C" { -int ChromeMain(int argc, const char** argv); +int ChromeMain(int argc, char** argv); } -int main(int argc, const char** argv) { - return ChromeMain(argc, argv); +int main(int argc, char* argv[]) { + int rv = ChromeMain(argc, argv); + + // exit, don't return from main, to avoid the apparent removal of main from + // stack backtraces under tail call optimization. + exit(rv); } |