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

Unified Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 1665513002: Pass both 32 and 64 bit snapshot and natives fds to child processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/lib/DEPS ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
Torne 2016/02/08 15:57:34 Does this CL implicitly clear up the issue from th
Tobias Sargeant 2016/02/09 10:37:37 The bug is probably not completely resolved, but g
- 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)) {
« no previous file with comments | « android_webview/lib/DEPS ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698