diff options
author | mnaganov <mnaganov@chromium.org> | 2015-08-25 10:20:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-25 17:21:13 +0000 |
commit | d6920a68b6d5d7bf4705945539f6fceaf0fe570f (patch) | |
tree | d2f96d4da7f0f78ea3b5bc9303f4e64c6f6e9795 /gin/v8_initializer.cc | |
parent | 113baae9c6a26518fdde8273652ba73981940d84 (diff) | |
download | chromium_src-d6920a68b6d5d7bf4705945539f6fceaf0fe570f.zip chromium_src-d6920a68b6d5d7bf4705945539f6fceaf0fe570f.tar.gz chromium_src-d6920a68b6d5d7bf4705945539f6fceaf0fe570f.tar.bz2 |
[Android WebView] Make loading of V8 data compatible with child services
1. Check for the process type when registering apk assets.
2. Fix Gin V8 initializer to allow retrieving of fd & region of
the mapped V8 files inside child_process_launcher.
3. There is no need to map icudtl specifically from WebView code since
http://crrev.com/335261
BUG=522205
Review URL: https://codereview.chromium.org/1301003002
Cr-Commit-Position: refs/heads/master@{#345362}
Diffstat (limited to 'gin/v8_initializer.cc')
-rw-r--r-- | gin/v8_initializer.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc index a82209f..810225c 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc @@ -297,6 +297,10 @@ void V8Initializer::LoadV8SnapshotFromFD(base::PlatformFile snapshot_pf, if (!VerifyV8StartupFile(&g_mapped_snapshot, g_snapshot_fingerprint)) result = V8_LOAD_FAILED_VERIFY; #endif // V8_VERIFY_EXTERNAL_STARTUP_DATA + if (result == V8_LOAD_SUCCESS) { + g_snapshot_pf = snapshot_pf; + g_snapshot_region = snapshot_region; + } UMA_HISTOGRAM_ENUMERATION("V8.Initializer.LoadV8Snapshot.Result", result, V8_LOAD_MAX_VALUE); } @@ -325,6 +329,8 @@ void V8Initializer::LoadV8NativesFromFD(base::PlatformFile natives_pf, LOG(FATAL) << "Couldn't verify contents of v8 natives data file"; } #endif // V8_VERIFY_EXTERNAL_STARTUP_DATA + g_natives_pf = natives_pf; + g_natives_region = natives_region; } // static |