Chromium Code Reviews| Index: gin/isolate_holder.cc |
| diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc |
| index 38215b2c9b584b9a1e3a144cca3508e6eeef9f49..a88bbfa457c19528d44ef8108705ca204919438f 100644 |
| --- a/gin/isolate_holder.cc |
| +++ b/gin/isolate_holder.cc |
| @@ -48,9 +48,13 @@ bool MapV8Files(base::FilePath* natives_path, base::FilePath* snapshot_path, |
| g_mapped_natives = new base::MemoryMappedFile; |
| if (!g_mapped_natives->IsValid()) { |
| +#ifndef OS_WIN |
|
jochen (gone - plz use gerrit)
2015/01/09 13:40:24
#if !defined(OS_WIN)
rmcilroy
2015/01/09 14:16:33
argh, that was the one thing I planned on changing
|
| if (natives_fd == -1 |
| ? !g_mapped_natives->Initialize(base::File(*natives_path, flags)) |
| : !g_mapped_natives->Initialize(base::File(natives_fd))) { |
| +#else |
| + if (!g_mapped_natives->Initialize(base::File(*natives_path, flags))) { |
| +#endif // OS_WIN |
| delete g_mapped_natives; |
| g_mapped_natives = NULL; |
| LOG(FATAL) << "Couldn't mmap v8 natives data file"; |
| @@ -60,9 +64,13 @@ bool MapV8Files(base::FilePath* natives_path, base::FilePath* snapshot_path, |
| g_mapped_snapshot = new base::MemoryMappedFile; |
| if (!g_mapped_snapshot->IsValid()) { |
| +#ifndef OS_WIN |
| if (snapshot_fd == -1 |
| ? !g_mapped_snapshot->Initialize(base::File(*snapshot_path, flags)) |
| : !g_mapped_snapshot->Initialize(base::File(snapshot_fd))) { |
| +#else |
| + if (!g_mapped_snapshot->Initialize(base::File(*snapshot_path, flags))) { |
| +#endif // OS_WIN |
| delete g_mapped_snapshot; |
| g_mapped_snapshot = NULL; |
| LOG(ERROR) << "Couldn't mmap v8 snapshot data file"; |
| @@ -91,6 +99,8 @@ const int v8_snapshot_dir = |
| 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 |