Chromium Code Reviews| Index: chrome/browser/chrome_content_browser_client.cc |
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
| index e6556154ee1bca31f7a0adcc65a8c7172a3ae66b..8871cc316c9a0317c209bfce608c08724bbcdebf 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -11,6 +11,9 @@ |
| #include "base/bind.h" |
| #include "base/command_line.h" |
| #include "base/lazy_instance.h" |
| +#if defined(V8_USE_EXTERNAL_STARTUP_DATA) && defined(OS_MACOSX) |
| +#include "base/mac/bundle_locations.h" |
| +#endif |
|
rmcilroy
2014/09/23 10:04:20
I don't think you need this here?
baixo
2014/09/23 11:36:46
Done.
|
| #include "base/path_service.h" |
| #include "base/prefs/pref_service.h" |
| #include "base/prefs/scoped_user_pref_update.h" |
| @@ -2449,6 +2452,26 @@ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
| mappings->push_back(FileDescriptorInfo(kAndroidICUDataDescriptor, |
| FileDescriptor(icudata_file.Pass()))); |
| +#ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| + base::FilePath v8_data_path; |
| + PathService::Get(base::DIR_ANDROID_APP_DATA, &v8_data_path); |
| + DCHECK(!v8_data_path.empty()); |
| + |
| + int file_flags = base::File::FLAG_OPEN | base::File::FLAG_READ; |
| + base::FilePath v8_natives_data_path = |
| + v8_data_path.AppendASCII("natives_blob.bin"); |
| + base::FilePath v8_snapshot_data_path = |
| + v8_data_path.AppendASCII("snapshot_blob.bin"); |
| + base::File v8_natives_data_file(v8_natives_data_path, file_flags); |
| + base::File v8_snapshot_data_file(v8_snapshot_data_path, file_flags); |
| + DCHECK(v8_natives_data_file.IsValid()); |
| + DCHECK(v8_snapshot_data_file.IsValid()); |
| + mappings->push_back(FileDescriptorInfo(kV8NativesDataDescriptor, |
| + FileDescriptor(v8_natives_data_file.Pass()))); |
| + mappings->push_back(FileDescriptorInfo(kV8SnapshotDataDescriptor, |
| + FileDescriptor(v8_snapshot_data_file.Pass()))); |
| +#endif // V8_USE_EXTERNAL_STARTUP_DATA |
| + |
| #else |
| int crash_signal_fd = GetCrashSignalFD(command_line); |
| if (crash_signal_fd >= 0) { |