| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 #if defined(OS_ANDROID) | 69 #if defined(OS_ANDROID) |
| 70 static base::PlatformFile GetOpenSnapshotFileForChildProcesses( | 70 static base::PlatformFile GetOpenSnapshotFileForChildProcesses( |
| 71 base::MemoryMappedFile::Region* region_out, | 71 base::MemoryMappedFile::Region* region_out, |
| 72 bool abi_32_bit); | 72 bool abi_32_bit); |
| 73 | 73 |
| 74 static base::FilePath GetNativesFilePath(); | 74 static base::FilePath GetNativesFilePath(); |
| 75 static base::FilePath GetSnapshotFilePath(bool abi_32_bit); | 75 static base::FilePath GetSnapshotFilePath(bool abi_32_bit); |
| 76 #endif | 76 #endif |
| 77 | 77 |
| 78 #endif // V8_USE_EXTERNAL_STARTUP_DATA | 78 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
| 79 |
| 80 // Load V8 context snapshot from user provided platform file descriptors. |
| 81 // Other details are same with LoadV8SnapshotFromFD. |
| 82 static void LoadV8ContextSnapshotFromFD(base::PlatformFile snapshot_fd, |
| 83 int64_t snapshot_offset, |
| 84 int64_t snapshot_size); |
| 85 |
| 86 // Load V8 context snapshot from default resources, if they are available. |
| 87 static void LoadV8ContextSnapshot(); |
| 88 |
| 89 // Get address and size information for currently loaded V8 context snapshot. |
| 90 // If no snapshot is loaded, the return values are nullptr and 0. |
| 91 static void GetV8ContextSnapshotData(const char** snapshot_data_out, |
| 92 int* snapshot_size_out); |
| 79 }; | 93 }; |
| 80 | 94 |
| 81 } // namespace gin | 95 } // namespace gin |
| 82 | 96 |
| 83 #endif // GIN_V8_INITIALIZER_H_ | 97 #endif // GIN_V8_INITIALIZER_H_ |
| OLD | NEW |