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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef GIN_V8_INITIALIZER_H_ 5 #ifndef GIN_V8_INITIALIZER_H_
6 #define GIN_V8_INITIALIZER_H_ 6 #define GIN_V8_INITIALIZER_H_
7 7
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/files/memory_mapped_file.h"
9 #include "gin/array_buffer.h" 10 #include "gin/array_buffer.h"
10 #include "gin/gin_export.h" 11 #include "gin/gin_export.h"
11 #include "gin/public/isolate_holder.h" 12 #include "gin/public/isolate_holder.h"
12 #include "gin/public/v8_platform.h" 13 #include "gin/public/v8_platform.h"
13 #include "v8/include/v8.h" 14 #include "v8/include/v8.h"
14 15
15 namespace gin { 16 namespace gin {
16 17
17 class GIN_EXPORT V8Initializer { 18 class GIN_EXPORT V8Initializer {
18 public: 19 public:
(...skipping 24 matching lines...) Expand all
43 int64 natives_offset, 44 int64 natives_offset,
44 int64 natives_size); 45 int64 natives_size);
45 46
46 // Load V8 snapshot from default resources, if they are available. 47 // Load V8 snapshot from default resources, if they are available.
47 static void LoadV8Snapshot(); 48 static void LoadV8Snapshot();
48 49
49 // Load V8 natives source from default resources. Contains asserts 50 // Load V8 natives source from default resources. Contains asserts
50 // so that it will not return if natives cannot be loaded. 51 // so that it will not return if natives cannot be loaded.
51 static void LoadV8Natives(); 52 static void LoadV8Natives();
52 53
53 // Opens the V8 snapshot data files and returns open file descriptors to these 54 // Opens (unless already cached) and returns the V8 natives file.
54 // files in |natives_fd_out| and |snapshot_fd_out|, which can be passed to 55 // Use with LoadV8NativesFromFD().
55 // child processes. 56 // Asserts if the file does not exist.
56 static bool OpenV8FilesForChildProcesses(base::PlatformFile* natives_fd_out, 57 static base::PlatformFile GetOpenNativesFileForChildProcesses(
57 base::PlatformFile* snapshot_fd_out) 58 base::MemoryMappedFile::Region* region_out);
58 WARN_UNUSED_RESULT; 59
60 // Opens (unless already cached) and returns the V8 snapshot file.
61 // Use with LoadV8SnapshotFromFD().
62 // Will return -1 if the file does not exist.
63 static base::PlatformFile GetOpenSnapshotFileForChildProcesses(
64 base::MemoryMappedFile::Region* region_out);
59 #endif // V8_USE_EXTERNAL_STARTUP_DATA 65 #endif // V8_USE_EXTERNAL_STARTUP_DATA
60 }; 66 };
61 67
62 } // namespace gin 68 } // namespace gin
63 69
64 #endif // GIN_V8_INITIALIZER_H_ 70 #endif // GIN_V8_INITIALIZER_H_
OLDNEW
« 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