Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: content/browser/child_process_launcher.cc

Issue 2075283003: Remove natives_blob.bin's arch dependence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
191 #if defined(OS_ANDROID) 191 #if defined(OS_ANDROID)
192 base::MemoryMappedFile::Region region; 192 base::MemoryMappedFile::Region region;
193 auto maybe_register = [&region, &regions, &files_to_register](int key, 193 auto maybe_register = [&region, &regions, &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(&region, true)); 202 gin::V8Initializer::GetOpenNativesFileForChildProcesses(&region));
203 maybe_register(
204 kV8NativesDataDescriptor64,
205 gin::V8Initializer::GetOpenNativesFileForChildProcesses(&region, false));
206 maybe_register( 203 maybe_register(
207 kV8SnapshotDataDescriptor32, 204 kV8SnapshotDataDescriptor32,
208 gin::V8Initializer::GetOpenSnapshotFileForChildProcesses(&region, true)); 205 gin::V8Initializer::GetOpenSnapshotFileForChildProcesses(&region, true));
209 maybe_register( 206 maybe_register(
210 kV8SnapshotDataDescriptor64, 207 kV8SnapshotDataDescriptor64,
211 gin::V8Initializer::GetOpenSnapshotFileForChildProcesses(&region, false)); 208 gin::V8Initializer::GetOpenSnapshotFileForChildProcesses(&region, 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698