| Index: ash/shell/content_client/shell_content_browser_client.cc
|
| diff --git a/ash/shell/content_client/shell_content_browser_client.cc b/ash/shell/content_client/shell_content_browser_client.cc
|
| index 51b0107d5ad9f1b8a532e3793655f9a506b1f193..cee77bf2aa9f4001e8ea661bad0acd8c38efbdf0 100644
|
| --- a/ash/shell/content_client/shell_content_browser_client.cc
|
| +++ b/ash/shell/content_client/shell_content_browser_client.cc
|
| @@ -16,12 +16,7 @@ namespace ash {
|
| namespace shell {
|
|
|
| ShellContentBrowserClient::ShellContentBrowserClient()
|
| - :
|
| -#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
| - v8_natives_fd_(-1),
|
| - v8_snapshot_fd_(-1),
|
| -#endif // OS_POSIX && !OS_MACOSX
|
| - shell_browser_main_parts_(nullptr) {
|
| + : shell_browser_main_parts_(nullptr) {
|
| }
|
|
|
| ShellContentBrowserClient::~ShellContentBrowserClient() {
|
| @@ -64,16 +59,10 @@ void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
|
| int child_process_id,
|
| content::FileDescriptorInfo* mappings) {
|
| #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
|
| - if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) {
|
| - int v8_natives_fd = -1;
|
| - int v8_snapshot_fd = -1;
|
| - if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd,
|
| - &v8_snapshot_fd)) {
|
| - v8_natives_fd_.reset(v8_natives_fd);
|
| - v8_snapshot_fd_.reset(v8_snapshot_fd);
|
| - }
|
| + if (!v8_files_.IsLoaded()) {
|
| + gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_files_);
|
| }
|
| - DCHECK(v8_natives_fd_.get() != -1 && v8_snapshot_fd_.get() != -1);
|
| + DCHECK(v8_files_.IsLoaded());
|
| mappings->Share(kV8NativesDataDescriptor, v8_natives_fd_.get());
|
| mappings->Share(kV8SnapshotDataDescriptor, v8_snapshot_fd_.get());
|
| #endif // V8_USE_EXTERNAL_STARTUP_DATA
|
|
|