OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "content/browser/child_process_launcher.h" | 5 #include "content/browser/child_process_launcher.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 #if defined(OS_ANDROID) | 191 #if defined(OS_ANDROID) |
192 base::MemoryMappedFile::Region region; | 192 base::MemoryMappedFile::Region region; |
193 auto maybe_register = [®ion, ®ions, &files_to_register](int key, | 193 auto maybe_register = [®ion, ®ions, &files_to_register](int key, |
194 int fd) { | 194 int fd) { |
195 if (fd != -1) { | 195 if (fd != -1) { |
196 files_to_register->Share(key, fd); | 196 files_to_register->Share(key, fd); |
197 regions.insert(std::make_pair(key, region)); | 197 regions.insert(std::make_pair(key, region)); |
198 } | 198 } |
199 }; | 199 }; |
200 maybe_register( | 200 maybe_register( |
201 kV8NativesDataDescriptor32, | 201 kV8NativesDataDescriptor, |
202 gin::V8Initializer::GetOpenNativesFileForChildProcesses(®ion, true)); | 202 gin::V8Initializer::GetOpenNativesFileForChildProcesses(®ion)); |
203 maybe_register( | |
204 kV8NativesDataDescriptor64, | |
205 gin::V8Initializer::GetOpenNativesFileForChildProcesses(®ion, false)); | |
206 maybe_register( | 203 maybe_register( |
207 kV8SnapshotDataDescriptor32, | 204 kV8SnapshotDataDescriptor32, |
208 gin::V8Initializer::GetOpenSnapshotFileForChildProcesses(®ion, true)); | 205 gin::V8Initializer::GetOpenSnapshotFileForChildProcesses(®ion, true)); |
209 maybe_register( | 206 maybe_register( |
210 kV8SnapshotDataDescriptor64, | 207 kV8SnapshotDataDescriptor64, |
211 gin::V8Initializer::GetOpenSnapshotFileForChildProcesses(®ion, false)); | 208 gin::V8Initializer::GetOpenSnapshotFileForChildProcesses(®ion, false)); |
212 | 209 |
213 snapshot_loaded = true; | 210 snapshot_loaded = true; |
214 #else | 211 #else |
215 base::PlatformFile natives_pf = | 212 base::PlatformFile natives_pf = |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 } | 615 } |
619 | 616 |
620 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( | 617 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( |
621 Client* client) { | 618 Client* client) { |
622 Client* ret = client_; | 619 Client* ret = client_; |
623 client_ = client; | 620 client_ = client; |
624 return ret; | 621 return ret; |
625 } | 622 } |
626 | 623 |
627 } // namespace content | 624 } // namespace content |
OLD | NEW |