| OLD | NEW |
| 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 "gin/array_buffer.h" | 9 #include "gin/array_buffer.h" |
| 10 #include "gin/gin_export.h" | 10 #include "gin/gin_export.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 int64 natives_offset, | 42 int64 natives_offset, |
| 43 int64 natives_size, | 43 int64 natives_size, |
| 44 base::PlatformFile snapshot_fd, | 44 base::PlatformFile snapshot_fd, |
| 45 int64 snapshot_offset, | 45 int64 snapshot_offset, |
| 46 int64 snapshot_size); | 46 int64 snapshot_size); |
| 47 | 47 |
| 48 // Load V8 snapshot from default resources. Returns true on success or | 48 // Load V8 snapshot from default resources. Returns true on success or |
| 49 // snapshot is already loaded, false otherwise. | 49 // snapshot is already loaded, false otherwise. |
| 50 static bool LoadV8Snapshot(); | 50 static bool LoadV8Snapshot(); |
| 51 | 51 |
| 52 // Opens the V8 snapshot data files and returns open file descriptors to these |
| 53 // files in |natives_fd_out| and |snapshot_fd_out|, which can be passed to |
| 54 // child processes. |
| 55 static bool OpenV8FilesForChildProcesses(base::PlatformFile* natives_fd_out, |
| 56 base::PlatformFile* snapshot_fd_out); |
| 57 |
| 52 #endif // V8_USE_EXTERNAL_STARTUP_DATA | 58 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
| 53 }; | 59 }; |
| 54 | 60 |
| 55 } // namespace gin | 61 } // namespace gin |
| 56 | 62 |
| 57 #endif // GIN_V8_INITIALIZER_H_ | 63 #endif // GIN_V8_INITIALIZER_H_ |
| OLD | NEW |