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; |
} |