Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[Backport] Move recently added functions to V8_USE_EXTERNAL_STARTUP_DATA
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mrunal.kapade authored and Raphael Kubo da Costa committed May 16, 2016
1 parent c2c2e87 commit 34b9287
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions gin/v8_initializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,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)

Expand Down Expand Up @@ -461,20 +475,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

0 comments on commit 34b9287

Please sign in to comment.