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

Unified Diff: gin/v8_initializer.h

Issue 1182443003: Moved logic for mapping child process FDs for ICU and V8 into child_process_launcher.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix lin Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/shell/browser/shell_content_browser_client.cc ('k') | gin/v8_initializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/v8_initializer.h
diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h
index 1e05fd038c8a4696358bfd0eb4a094a3ab95d7c9..e18143692256ec8ee292407eead53525489ee6fd 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
};
« no previous file with comments | « extensions/shell/browser/shell_content_browser_client.cc ('k') | gin/v8_initializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698