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 0be391ed1f25a8d71bdba882b1e4aeb22a8d35aa..cb8485f63f9dc11ed8d90e7ed008522db6bcfa9f 100644 |
--- a/content/browser/renderer_host/render_view_host_impl.cc |
+++ b/content/browser/renderer_host/render_view_host_impl.cc |
@@ -473,6 +473,18 @@ WebPreferences RenderViewHostImpl::GetWebkitPrefs(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; |
} |