Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Unified Diff: gin/isolate_holder.cc

Issue 944913002: Transfer v8 snapshot files as file descriptors to child processes on Posix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix iOS Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/browser/shell_content_browser_client.cc ('k') | gin/public/isolate_holder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/isolate_holder.cc
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
index daa04f177c9bd053b61b08cb2015d3b089d3a145..92fb3628deef9baec7710d654019d422777b19be 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -106,18 +106,6 @@ bool VerifyV8SnapshotFile(base::MemoryMappedFile* snapshot_file,
return !memcmp(fingerprint, output, sizeof(output));
}
#endif // V8_VERIFY_EXTERNAL_STARTUP_DATA
-
-#if !defined(OS_MACOSX)
-const int v8_snapshot_dir =
-#if defined(OS_ANDROID)
- base::DIR_ANDROID_APP_DATA;
-#elif defined(OS_POSIX)
- base::DIR_EXE;
-#elif defined(OS_WIN)
- base::DIR_MODULE;
-#endif // OS_ANDROID
-#endif // !OS_MACOSX
-
#endif // V8_USE_EXTERNAL_STARTUP_DATA
} // namespace
@@ -130,6 +118,17 @@ extern const unsigned char g_natives_fingerprint[];
extern const unsigned char g_snapshot_fingerprint[];
#endif // V8_VERIFY_EXTERNAL_STARTUP_DATA
+#if !defined(OS_MACOSX)
+const int IsolateHolder::kV8SnapshotBasePathKey =
+#if defined(OS_ANDROID)
+ base::DIR_ANDROID_APP_DATA;
+#elif defined(OS_POSIX)
+ base::DIR_EXE;
+#elif defined(OS_WIN)
+ base::DIR_MODULE;
+#endif // OS_ANDROID
+#endif // !OS_MACOSX
+
const char IsolateHolder::kNativesFileName[] = "natives_blob.bin";
const char IsolateHolder::kSnapshotFileName[] = "snapshot_blob.bin";
@@ -140,7 +139,7 @@ bool IsolateHolder::LoadV8Snapshot() {
#if !defined(OS_MACOSX)
base::FilePath data_path;
- PathService::Get(v8_snapshot_dir, &data_path);
+ PathService::Get(kV8SnapshotBasePathKey, &data_path);
DCHECK(!data_path.empty());
base::FilePath natives_path = data_path.AppendASCII(kNativesFileName);
« no previous file with comments | « content/shell/browser/shell_content_browser_client.cc ('k') | gin/public/isolate_holder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698