OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "mojo/runner/init.h" | 5 #include "mojo/runner/init.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 10 #include "base/command_line.h" |
9 #include "base/debug/debugger.h" | 11 #include "base/debug/debugger.h" |
10 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
11 #include "base/i18n/icu_util.h" | 13 #include "base/i18n/icu_util.h" |
12 #include "base/logging.h" | 14 #include "base/logging.h" |
13 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
14 #include "base/strings/string_split.h" | 16 #include "base/strings/string_split.h" |
15 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
16 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #else | 61 #else |
60 LOG(ERROR) << app << " waiting for GDB. pid: " << getpid(); | 62 LOG(ERROR) << app << " waiting for GDB. pid: " << getpid(); |
61 base::debug::WaitForDebugger(60, true); | 63 base::debug::WaitForDebugger(60, true); |
62 #endif | 64 #endif |
63 } | 65 } |
64 } | 66 } |
65 } | 67 } |
66 | 68 |
67 void CallLibraryEarlyInitialization(base::NativeLibrary app_library) { | 69 void CallLibraryEarlyInitialization(base::NativeLibrary app_library) { |
68 // Do whatever warming that the mojo application wants. | 70 // Do whatever warming that the mojo application wants. |
69 typedef void (*LibraryEarlyInitFunction)(const uint8*); | 71 typedef void (*LibraryEarlyInitFunction)(const uint8_t*); |
70 LibraryEarlyInitFunction init_function = | 72 LibraryEarlyInitFunction init_function = |
71 reinterpret_cast<LibraryEarlyInitFunction>( | 73 reinterpret_cast<LibraryEarlyInitFunction>( |
72 base::GetFunctionPointerFromNativeLibrary(app_library, | 74 base::GetFunctionPointerFromNativeLibrary(app_library, |
73 "InitializeBase")); | 75 "InitializeBase")); |
74 if (init_function) { | 76 if (init_function) { |
75 // Get the ICU data that we prewarmed in the runner and then pass it to | 77 // Get the ICU data that we prewarmed in the runner and then pass it to |
76 // the copy of icu in the mojo binary that we're running. | 78 // the copy of icu in the mojo binary that we're running. |
77 const uint8* icu_data = base::i18n::GetRawIcuMemory(); | 79 const uint8_t* icu_data = base::i18n::GetRawIcuMemory(); |
78 init_function(icu_data); | 80 init_function(icu_data); |
79 } | 81 } |
80 | 82 |
81 // TODO(erg): All chromium binaries load base. We might want to make a | 83 // TODO(erg): All chromium binaries load base. We might want to make a |
82 // general system for other people. | 84 // general system for other people. |
83 } | 85 } |
84 | 86 |
85 } // namespace runner | 87 } // namespace runner |
86 } // namespace mojo | 88 } // namespace mojo |
OLD | NEW |