summaryrefslogtreecommitdiffstats
path: root/gin/v8_initializer.h
diff options
context:
space:
mode:
authoragrieve <agrieve@chromium.org>2015-06-16 14:39:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-16 21:40:36 +0000
commit228414fc8870f88f11ada7512e88ea6999890f56 (patch)
treef108d63ff373f567e64098d1b80f923fd4f92ee9 /gin/v8_initializer.h
parentddb8277bd42616cbf74e56ca28f8991b78994057 (diff)
downloadchromium_src-228414fc8870f88f11ada7512e88ea6999890f56.zip
chromium_src-228414fc8870f88f11ada7512e88ea6999890f56.tar.gz
chromium_src-228414fc8870f88f11ada7512e88ea6999890f56.tar.bz2
Moved logic for mapping child process FDs for ICU and V8 into child_process_launcher.cc
Used to be defined in each app's ContentBrowserClient, but since content/ is the one that receives the FDs, it makes sense that it should be the one to send them. This also removes ChildProcessLauncher::AppendMappedFileCommandLineSwitches as it is no longer needed. BUG=394502 Review URL: https://codereview.chromium.org/1182443003 Cr-Commit-Position: refs/heads/master@{#334702}
Diffstat (limited to 'gin/v8_initializer.h')
-rw-r--r--gin/v8_initializer.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h
index 1e05fd0..e181436 100644
--- a/gin/v8_initializer.h
+++ b/gin/v8_initializer.h
@@ -6,6 +6,7 @@
#define GIN_V8_INITIALIZER_H_
#include "base/files/file.h"
+#include "base/files/memory_mapped_file.h"
#include "gin/array_buffer.h"
#include "gin/gin_export.h"
#include "gin/public/isolate_holder.h"
@@ -50,12 +51,17 @@ class GIN_EXPORT V8Initializer {
// so that it will not return if natives cannot be loaded.
static void LoadV8Natives();
- // Opens the V8 snapshot data files and returns open file descriptors to these
- // files in |natives_fd_out| and |snapshot_fd_out|, which can be passed to
- // child processes.
- static bool OpenV8FilesForChildProcesses(base::PlatformFile* natives_fd_out,
- base::PlatformFile* snapshot_fd_out)
- WARN_UNUSED_RESULT;
+ // Opens (unless already cached) and returns the V8 natives file.
+ // Use with LoadV8NativesFromFD().
+ // Asserts if the file does not exist.
+ static base::PlatformFile GetOpenNativesFileForChildProcesses(
+ base::MemoryMappedFile::Region* region_out);
+
+ // Opens (unless already cached) and returns the V8 snapshot file.
+ // Use with LoadV8SnapshotFromFD().
+ // Will return -1 if the file does not exist.
+ static base::PlatformFile GetOpenSnapshotFileForChildProcesses(
+ base::MemoryMappedFile::Region* region_out);
#endif // V8_USE_EXTERNAL_STARTUP_DATA
};