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

Side by Side Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 903793002: Name V8 snapshot according to target architecture (32/64 bit). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 unified diff | Download patch
OLDNEW
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 "android_webview/lib/main/aw_main_delegate.h" 5 #include "android_webview/lib/main/aw_main_delegate.h"
6 6
7 #include "android_webview/browser/aw_content_browser_client.h" 7 #include "android_webview/browser/aw_content_browser_client.h"
8 #include "android_webview/browser/browser_view_renderer.h" 8 #include "android_webview/browser/browser_view_renderer.h"
9 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" 9 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h"
10 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" 10 #include "android_webview/lib/aw_browser_dependency_factory_impl.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // This is needed for sharing textures across the different GL threads. 85 // This is needed for sharing textures across the different GL threads.
86 cl->AppendSwitch(switches::kEnableThreadedTextureMailboxes); 86 cl->AppendSwitch(switches::kEnableThreadedTextureMailboxes);
87 87
88 // This is needed to be able to mmap the V8 snapshot and ICU data file 88 // This is needed to be able to mmap the V8 snapshot and ICU data file
89 // directly from the WebView .apk. 89 // directly from the WebView .apk.
90 // This needs to be here so that it gets to run before the code in 90 // This needs to be here so that it gets to run before the code in
91 // content_main_runner that reads these values tries to do so. 91 // content_main_runner that reads these values tries to do so.
92 // In multi-process mode this code would live in 92 // In multi-process mode this code would live in
93 // AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess. 93 // AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess.
94 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 94 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
95 #ifdef __LP64__
96 const char kNativesFileName[] = "natives_blob_64.bin";
97 const char kSnapshotFileName[] = "snapshot_blob_64.bin";
98 #else
99 const char kNativesFileName[] = "natives_blob_32.bin";
100 const char kSnapshotFileName[] = "snapshot_blob_32.bin";
rmcilroy 2015/02/09 14:59:59 nit - could you add a comment that we should reuse
gsennton 2015/02/09 15:47:46 Done.
101 #endif // __LP64__
95 CHECK(AwAssets::RegisterAssetWithGlobalDescriptors( 102 CHECK(AwAssets::RegisterAssetWithGlobalDescriptors(
96 kV8NativesDataDescriptor, gin::IsolateHolder::kNativesFileName)); 103 kV8NativesDataDescriptor, kNativesFileName));
97 CHECK(AwAssets::RegisterAssetWithGlobalDescriptors( 104 CHECK(AwAssets::RegisterAssetWithGlobalDescriptors(
98 kV8SnapshotDataDescriptor, gin::IsolateHolder::kSnapshotFileName)); 105 kV8SnapshotDataDescriptor, kSnapshotFileName));
99 #endif 106 #endif
100 // TODO(mkosiba): make this CHECK when the android_webview_build uses an asset 107 // TODO(mkosiba): make this CHECK when the android_webview_build uses an asset
101 // from the .apk too. 108 // from the .apk too.
102 AwAssets::RegisterAssetWithGlobalDescriptors( 109 AwAssets::RegisterAssetWithGlobalDescriptors(
103 kAndroidICUDataDescriptor, base::i18n::kIcuDataFileName); 110 kAndroidICUDataDescriptor, base::i18n::kIcuDataFileName);
104 111
105 return false; 112 return false;
106 } 113 }
107 114
108 void AwMainDelegate::PreSandboxStartup() { 115 void AwMainDelegate::PreSandboxStartup() {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 185
179 #if defined(VIDEO_HOLE) 186 #if defined(VIDEO_HOLE)
180 content::ExternalVideoSurfaceContainer* 187 content::ExternalVideoSurfaceContainer*
181 AwMainDelegate::CreateExternalVideoSurfaceContainer( 188 AwMainDelegate::CreateExternalVideoSurfaceContainer(
182 content::WebContents* web_contents) { 189 content::WebContents* web_contents) {
183 return new ExternalVideoSurfaceContainerImpl(web_contents); 190 return new ExternalVideoSurfaceContainerImpl(web_contents);
184 } 191 }
185 #endif 192 #endif
186 193
187 } // namespace android_webview 194 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698