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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 431323003: Implement --v8-cache-options (instead of --enable-preparsed-js-caching) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixup after more rebase. Created 6 years, 4 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
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 3ab2edb0687ed6f1f95841c0a1b1a02a3990f776..500650094a8e8d3126a893b8fe5d87a7ed366b77 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -469,6 +469,18 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs(const GURL& url) {
prefs.spatial_navigation_enabled = command_line.HasSwitch(
switches::kEnableSpatialNavigation);
+ if (command_line.HasSwitch(switches::kV8CacheOptions)) {
+ const std::string v8_cache_options =
+ command_line.GetSwitchValueASCII(switches::kV8CacheOptions);
+ if (v8_cache_options == "parse") {
+ prefs.v8_cache_options = V8_CACHE_OPTIONS_PARSE;
+ } else if (v8_cache_options == "code") {
+ prefs.v8_cache_options = V8_CACHE_OPTIONS_CODE;
+ } else {
+ prefs.v8_cache_options = V8_CACHE_OPTIONS_OFF;
+ }
+ }
+
GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs);
return prefs;
}
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698