| Index: android_webview/lib/main/aw_main_delegate.cc
|
| diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc
|
| index e0025feb9d4e1b14a59c3913136c9751388a35b5..e858652aa01446a8b1e6020d9cf250b6765e0882 100644
|
| --- a/android_webview/lib/main/aw_main_delegate.cc
|
| +++ b/android_webview/lib/main/aw_main_delegate.cc
|
| @@ -34,6 +34,7 @@
|
| #include "content/public/common/content_descriptors.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "gin/public/isolate_holder.h"
|
| +#include "gin/v8_initializer.h"
|
| #include "gpu/command_buffer/client/gl_in_process_context.h"
|
| #include "gpu/command_buffer/service/gpu_switches.h"
|
| #include "media/base/media_switches.h"
|
| @@ -117,24 +118,19 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
|
| if (cl->GetSwitchValueASCII(switches::kProcessType).empty()) {
|
| // Browser process (no type specified).
|
|
|
| - // This code is needed to be able to mmap the V8 snapshot directly from
|
| - // the WebView .apk using architecture-specific names.
|
| - // This needs to be here so that it gets to run before the code in
|
| - // content_main_runner that reads these values tries to do so.
|
| -#ifdef __LP64__
|
| - const char kNativesFileName[] = "assets/natives_blob_64.bin";
|
| - const char kSnapshotFileName[] = "assets/snapshot_blob_64.bin";
|
| -#else
|
| - const char kNativesFileName[] = "assets/natives_blob_32.bin";
|
| - const char kSnapshotFileName[] = "assets/snapshot_blob_32.bin";
|
| -#endif // __LP64__
|
| - // TODO(gsennton) we should use
|
| - // gin::IsolateHolder::kNativesFileName/kSnapshotFileName
|
| - // here when those files have arch specific names http://crbug.com/455699
|
| - CHECK(base::android::RegisterApkAssetWithGlobalDescriptors(
|
| - kV8NativesDataDescriptor, kNativesFileName));
|
| - CHECK(base::android::RegisterApkAssetWithGlobalDescriptors(
|
| - kV8SnapshotDataDescriptor, kSnapshotFileName));
|
| + base::android::RegisterApkAssetWithGlobalDescriptors(
|
| + kV8NativesDataDescriptor32,
|
| + gin::V8Initializer::GetNativesFilePath(true).AsUTF8Unsafe());
|
| + base::android::RegisterApkAssetWithGlobalDescriptors(
|
| + kV8SnapshotDataDescriptor32,
|
| + gin::V8Initializer::GetSnapshotFilePath(true).AsUTF8Unsafe());
|
| +
|
| + base::android::RegisterApkAssetWithGlobalDescriptors(
|
| + kV8NativesDataDescriptor64,
|
| + gin::V8Initializer::GetNativesFilePath(false).AsUTF8Unsafe());
|
| + base::android::RegisterApkAssetWithGlobalDescriptors(
|
| + kV8SnapshotDataDescriptor64,
|
| + gin::V8Initializer::GetSnapshotFilePath(false).AsUTF8Unsafe());
|
| }
|
|
|
| if (cl->HasSwitch(switches::kWebViewSandboxedRenderer)) {
|
|
|