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

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: incorporated vogelheim's comment Created 4 years, 8 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 7470f70ed4c369bbb5e8a967e1a2111ba902aa15..8d0acb27a555e6be7b2a6c6fec9184d7163eff9f 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()) {
vogelheim 2016/05/03 11:36:05 patch set #2 implemented this so that the ServiceW
+ switch (frame()->settings()->v8CacheStrategiesForCacheStorage()) {
+ case V8CacheStrategiesForCacheStorage::Default:
+ case V8CacheStrategiesForCacheStorage::None:
+ v8CacheOptions = V8CacheOptionsNone;
+ break;
+ case V8CacheStrategiesForCacheStorage::Normal:
+ v8CacheOptions = V8CacheOptionsDefault;
vogelheim 2016/05/03 11:36:05 V8CacheOptionsCode? (Loosely related to the previ
horo 2016/05/09 04:00:04 Yes. I think V8CacheStrategiesForCacheStorage shou
+ break;
+ case V8CacheStrategiesForCacheStorage::Aggressive:
+ v8CacheOptions = V8CacheOptionsAlways;
+ break;
+ }
+ }
// Isolate exceptions that occur when compiling and executing
// the code. These exceptions should not interfere with
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698