| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // The entry point for all Mac Chromium processes, including the outer app | 5 // The entry point for all Mac Chromium processes, including the outer app |
| 6 // bundle (browser) and helper app (renderer, plugin, and friends). | 6 // bundle (browser) and helper app (renderer, plugin, and friends). |
| 7 | 7 |
| 8 #include <dlfcn.h> | 8 #include <dlfcn.h> |
| 9 #include <errno.h> | 9 #include <errno.h> |
| 10 #include <libgen.h> | 10 #include <libgen.h> |
| 11 #include <mach-o/dyld.h> | 11 #include <mach-o/dyld.h> |
| 12 #include <stddef.h> |
| 13 #include <stdint.h> |
| 12 #include <stdio.h> | 14 #include <stdio.h> |
| 13 #include <stdlib.h> | 15 #include <stdlib.h> |
| 14 #include <string.h> | 16 #include <string.h> |
| 15 #include <unistd.h> | 17 #include <unistd.h> |
| 16 | 18 |
| 17 #include "chrome/common/chrome_version.h" | 19 #include "chrome/common/chrome_version.h" |
| 18 | 20 |
| 19 typedef int (*ChromeMainPtr)(int, char**); | 21 typedef int (*ChromeMainPtr)(int, char**); |
| 20 | 22 |
| 21 __attribute__((visibility("default"))) int main(int argc, char* argv[]) { | 23 __attribute__((visibility("default"))) int main(int argc, char* argv[]) { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 if (!chrome_main) { | 83 if (!chrome_main) { |
| 82 fprintf(stderr, "dlsym ChromeMain: %s\n", dlerror()); | 84 fprintf(stderr, "dlsym ChromeMain: %s\n", dlerror()); |
| 83 abort(); | 85 abort(); |
| 84 } | 86 } |
| 85 rv = chrome_main(argc, argv); | 87 rv = chrome_main(argc, argv); |
| 86 | 88 |
| 87 // exit, don't return from main, to avoid the apparent removal of main from | 89 // exit, don't return from main, to avoid the apparent removal of main from |
| 88 // stack backtraces under tail call optimization. | 90 // stack backtraces under tail call optimization. |
| 89 exit(rv); | 91 exit(rv); |
| 90 } | 92 } |
| OLD | NEW |