summaryrefslogtreecommitdiffstats
path: root/gin
diff options
context:
space:
mode:
authormichaelbai <michaelbai@chromium.org>2015-10-22 16:58:53 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-22 23:59:52 +0000
commit979b03a19f63b1cbe02fa3df99707c3f93f7c9cf (patch)
tree6f7185e47abf2c6cf3a054fb5ac0bc270ddc6147 /gin
parentd5ac7d52b323d04178bba9cc746c623438d48751 (diff)
downloadchromium_src-979b03a19f63b1cbe02fa3df99707c3f93f7c9cf.zip
chromium_src-979b03a19f63b1cbe02fa3df99707c3f93f7c9cf.tar.gz
chromium_src-979b03a19f63b1cbe02fa3df99707c3f93f7c9cf.tar.bz2
Switch Chrome Android using v8 arch specific external data name
For 32-bit, natives_blob_32.bin and snapshot_blob_32.bin are used. For 64-bit, natives_blob_64.bin and natives_blob_64.bin are used. This patch also removed the existing v8 startup data in destination directory by using copy_ex to remove directory first. BUG=540788 Review URL: https://codereview.chromium.org/1400953002 Cr-Commit-Position: refs/heads/master@{#355680}
Diffstat (limited to 'gin')
-rw-r--r--gin/v8_initializer.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 810225c..8bcc78d 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -53,8 +53,19 @@ base::PlatformFile g_snapshot_pf = kInvalidPlatformFile;
base::MemoryMappedFile::Region g_natives_region;
base::MemoryMappedFile::Region g_snapshot_region;
+#if defined(OS_ANDROID)
+#ifdef __LP64__
+const char kNativesFileName[] = "natives_blob_64.bin";
+const char kSnapshotFileName[] = "snapshot_blob_64.bin";
+#else
+const char kNativesFileName[] = "natives_blob_32.bin";
+const char kSnapshotFileName[] = "snapshot_blob_32.bin";
+#endif // __LP64__
+
+#else // defined(OS_ANDROID)
const char kNativesFileName[] = "natives_blob.bin";
const char kSnapshotFileName[] = "snapshot_blob.bin";
+#endif // defined(OS_ANDROID)
void GetV8FilePath(const char* file_name, base::FilePath* path_out) {
#if !defined(OS_MACOSX)