From ded427a3daea7741e52c47a905e95e007529d14f Mon Sep 17 00:00:00 2001 From: "mrunal.kapade" Date: Mon, 25 Apr 2016 17:10:44 -0700 Subject: [PATCH] Move recently added functions to V8_USE_EXTERNAL_STARTUP_DATA With the change in https://codereview.chromium.org/1665513002 the contributor missed out adding couple of the functions within appropriate #if defined(V8_USE_EXTERNAL_STARTUP_DATA) block BUG= Review URL: https://codereview.chromium.org/1909383004 Cr-Commit-Position: refs/heads/master@{#389626} --- gin/v8_initializer.cc | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc index 41e34e865675bb..419c49fba498d0 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc @@ -402,6 +402,20 @@ base::PlatformFile V8Initializer::GetOpenSnapshotFileForChildProcesses( *region_out = opened.second; return opened.first; } + +// static +base::FilePath V8Initializer::GetNativesFilePath(bool abi_32_bit) { + base::FilePath path; + GetV8FilePath(abi_32_bit ? kNativesFileName32 : kNativesFileName64, &path); + return path; +} + +// static +base::FilePath V8Initializer::GetSnapshotFilePath(bool abi_32_bit) { + base::FilePath path; + GetV8FilePath(abi_32_bit ? kSnapshotFileName32 : kSnapshotFileName64, &path); + return path; +} #endif // defined(OS_ANDROID) #endif // defined(V8_USE_EXTERNAL_STARTUP_DATA) @@ -470,20 +484,4 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** natives_data_out, } } -#if defined(OS_ANDROID) -// static -base::FilePath V8Initializer::GetNativesFilePath(bool abi_32_bit) { - base::FilePath path; - GetV8FilePath(abi_32_bit ? kNativesFileName32 : kNativesFileName64, &path); - return path; -} - -// static -base::FilePath V8Initializer::GetSnapshotFilePath(bool abi_32_bit) { - base::FilePath path; - GetV8FilePath(abi_32_bit ? kSnapshotFileName32 : kSnapshotFileName64, &path); - return path; -} -#endif // defined(OS_ANDROID) - } // namespace gin