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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 kV8NativesDataDescriptor + base::GlobalDescriptors::kBaseDescriptor); | 721 kV8NativesDataDescriptor + base::GlobalDescriptors::kBaseDescriptor); |
722 } | 722 } |
723 if (command_line.HasSwitch(switches::kV8SnapshotPassedByFD)) { | 723 if (command_line.HasSwitch(switches::kV8SnapshotPassedByFD)) { |
724 g_fds->Set( | 724 g_fds->Set( |
725 kV8SnapshotDataDescriptor, | 725 kV8SnapshotDataDescriptor, |
726 kV8SnapshotDataDescriptor + base::GlobalDescriptors::kBaseDescriptor); | 726 kV8SnapshotDataDescriptor + base::GlobalDescriptors::kBaseDescriptor); |
727 } | 727 } |
728 #endif // !OS_ANDROID | 728 #endif // !OS_ANDROID |
729 int v8_natives_fd = g_fds->MaybeGet(kV8NativesDataDescriptor); | 729 int v8_natives_fd = g_fds->MaybeGet(kV8NativesDataDescriptor); |
730 int v8_snapshot_fd = g_fds->MaybeGet(kV8SnapshotDataDescriptor); | 730 int v8_snapshot_fd = g_fds->MaybeGet(kV8SnapshotDataDescriptor); |
| 731 LOG(WARNING) << "start-up f*" << v8_natives_fd; |
731 if (v8_natives_fd != -1 && v8_snapshot_fd != -1) { | 732 if (v8_natives_fd != -1 && v8_snapshot_fd != -1) { |
732 auto v8_natives_region = g_fds->GetRegion(kV8NativesDataDescriptor); | 733 auto v8_natives_region = g_fds->GetRegion(kV8NativesDataDescriptor); |
733 auto v8_snapshot_region = g_fds->GetRegion(kV8SnapshotDataDescriptor); | 734 auto v8_snapshot_region = g_fds->GetRegion(kV8SnapshotDataDescriptor); |
734 CHECK(gin::V8Initializer::LoadV8SnapshotFromFD( | 735 CHECK(gin::V8Initializer::LoadV8SnapshotFromFD( |
735 v8_natives_fd, v8_natives_region.offset, v8_natives_region.size, | 736 v8_natives_fd, v8_natives_region.offset, v8_natives_region.size, |
736 v8_snapshot_fd, v8_snapshot_region.offset, v8_snapshot_region.size)); | 737 v8_snapshot_fd, v8_snapshot_region.offset, v8_snapshot_region.size)); |
737 } else { | 738 } else { |
738 CHECK(gin::V8Initializer::LoadV8Snapshot()); | 739 CHECK(gin::V8Initializer::LoadV8Snapshot()); |
739 } | 740 } |
740 #else | 741 #else |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 | 848 |
848 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 849 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
849 }; | 850 }; |
850 | 851 |
851 // static | 852 // static |
852 ContentMainRunner* ContentMainRunner::Create() { | 853 ContentMainRunner* ContentMainRunner::Create() { |
853 return new ContentMainRunnerImpl(); | 854 return new ContentMainRunnerImpl(); |
854 } | 855 } |
855 | 856 |
856 } // namespace content | 857 } // namespace content |
OLD | NEW |