Chromium Code Reviews| Index: gin/v8_initializer.h |
| diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h |
| index 0189f594f939322a7b5ec65d2f2612afa5660d4e..3650716a120095faca61ff869f958370550468b9 100644 |
| --- a/gin/v8_initializer.h |
| +++ b/gin/v8_initializer.h |
| @@ -33,16 +33,22 @@ class GIN_EXPORT V8Initializer { |
| // The offset and size arguments, if non-zero, specify the portions |
| // of the files to be loaded. This methods returns true on success |
| // (or if snapshot is already loaded), false otherwise. |
| - static bool LoadV8SnapshotFromFD(base::PlatformFile natives_fd, |
| - int64 natives_offset, |
| - int64 natives_size, |
| - base::PlatformFile snapshot_fd, |
| + static bool LoadV8SnapshotFromFD(base::PlatformFile snapshot_fd, |
| int64 snapshot_offset, |
| - int64 snapshot_size); |
| + int64 snapshot_size) WARN_UNUSED_RESULT; |
|
rmcilroy
2015/06/02 15:20:27
Remove bool return value here to be consistent wit
Erik Corry Chromium.org
2015/06/04 11:40:40
Done.
|
| + // Similar to LoadV8SnapshotFromFD, but for the source of the natives. |
| + // Without the natives we cannot continue, so this function contains |
| + // release mode asserts and won't return if it fails. |
| + static void LoadV8NativesFromFD(base::PlatformFile natives_fd, |
| + int64 natives_offset, |
| + int64 natives_size); |
| - // Load V8 snapshot from default resources. Returns true on success or |
| - // snapshot is already loaded, false otherwise. |
| - static bool LoadV8Snapshot(); |
| + // Load V8 snapshot from default resources, if they are available. |
| + static void LoadV8Snapshot(); |
| + |
| + // Load V8 natives source from default resources. Contains asserts |
| + // 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 |