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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp

Issue 1915833002: Introduce Platform::cacheMetadataInCacheStorage() to store V8 code cache in CacheStorage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments in render_process_messages.h Created 4 years, 7 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: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
index c70d1dfc9e8d01f2e3eec761c968283e046904d0..d318dd64d4739e303a95011f1114540a275ff7d1 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
@@ -131,6 +131,20 @@ v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(v8::Local<v8:
V8CacheOptions v8CacheOptions(V8CacheOptionsDefault);
if (frame()->settings())
v8CacheOptions = frame()->settings()->v8CacheOptions();
+ if (source.resource() && !source.resource()->response().cacheStorageCacheName().isNull()) {
+ switch (frame()->settings()->v8CacheStrategiesForCacheStorage()) {
+ case V8CacheStrategiesForCacheStorage::Default:
+ case V8CacheStrategiesForCacheStorage::None:
+ v8CacheOptions = V8CacheOptionsNone;
+ break;
+ case V8CacheStrategiesForCacheStorage::Normal:
+ v8CacheOptions = V8CacheOptionsCode;
+ break;
+ case V8CacheStrategiesForCacheStorage::Aggressive:
+ v8CacheOptions = V8CacheOptionsAlways;
+ break;
+ }
+ }
// Isolate exceptions that occur when compiling and executing
// the code. These exceptions should not interfere with

Powered by Google App Engine
This is Rietveld 408576698