| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/public/app/content_main_runner.h" | 5 #include "content/public/app/content_main_runner.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "base/allocator/allocator_extension.h" | 9 #include "base/allocator/allocator_extension.h" |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 | 723 |
| 724 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 724 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| 725 int v8_natives_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( | 725 int v8_natives_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( |
| 726 kV8NativesDataDescriptor); | 726 kV8NativesDataDescriptor); |
| 727 int v8_snapshot_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( | 727 int v8_snapshot_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( |
| 728 kV8SnapshotDataDescriptor); | 728 kV8SnapshotDataDescriptor); |
| 729 if (v8_natives_fd != -1 && v8_snapshot_fd != -1) { | 729 if (v8_natives_fd != -1 && v8_snapshot_fd != -1) { |
| 730 CHECK(gin::IsolateHolder::LoadV8SnapshotFD(v8_natives_fd, | 730 CHECK(gin::IsolateHolder::LoadV8SnapshotFD(v8_natives_fd, |
| 731 v8_snapshot_fd)); | 731 v8_snapshot_fd)); |
| 732 } else { | 732 } else { |
| 733 CHECK(gin::IsolateHolder::LoadV8Snapshot()); | 733 CHECK(gin::IsolateHolder::LoadAndVerifyV8Snapshot()); |
| 734 } | 734 } |
| 735 #endif // V8_USE_EXTERNAL_STARTUP_DATA | 735 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
| 736 | 736 |
| 737 #else | 737 #else |
| 738 CHECK(base::i18n::InitializeICU()); | 738 CHECK(base::i18n::InitializeICU()); |
| 739 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 739 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| 740 CHECK(gin::IsolateHolder::LoadV8Snapshot()); | 740 CHECK(gin::IsolateHolder::LoadAndVerifyV8Snapshot()); |
| 741 #endif // V8_USE_EXTERNAL_STARTUP_DATA | 741 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
| 742 #endif // OS_ANDROID | 742 #endif // OS_ANDROID |
| 743 | 743 |
| 744 InitializeStatsTable(command_line); | 744 InitializeStatsTable(command_line); |
| 745 | 745 |
| 746 if (delegate_) | 746 if (delegate_) |
| 747 delegate_->PreSandboxStartup(); | 747 delegate_->PreSandboxStartup(); |
| 748 | 748 |
| 749 if (!process_type.empty()) | 749 if (!process_type.empty()) |
| 750 CommonSubprocessInit(process_type); | 750 CommonSubprocessInit(process_type); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 | 848 |
| 849 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 849 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 850 }; | 850 }; |
| 851 | 851 |
| 852 // static | 852 // static |
| 853 ContentMainRunner* ContentMainRunner::Create() { | 853 ContentMainRunner* ContentMainRunner::Create() { |
| 854 return new ContentMainRunnerImpl(); | 854 return new ContentMainRunnerImpl(); |
| 855 } | 855 } |
| 856 | 856 |
| 857 } // namespace content | 857 } // namespace content |
| OLD | NEW |