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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.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/V8ScriptRunner.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
index 6eb2f137f27a4ac94ec4d790f2321ec1fce2df7e..e81ab233954bd9c8295382944f2587e51db05998 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
@@ -248,6 +248,9 @@ v8::MaybeLocal<v8::Script> postStreamCompile(V8CacheOptions cacheOptions, Cached
V8ScriptRunner::setCacheTimeStamp(cacheHandler);
break;
+ case V8CacheOptionsAlways:
+ // Currently V8CacheOptionsAlways doesn't support streaming.
+ ASSERT_NOT_REACHED();
case V8CacheOptionsNone:
break;
}
@@ -295,14 +298,15 @@ PassOwnPtr<CompileFn> selectCompileFunction(V8CacheOptions cacheOptions, CachedM
break;
case V8CacheOptionsDefault:
- case V8CacheOptionsCode: {
+ case V8CacheOptionsCode:
+ case V8CacheOptionsAlways: {
// Use code caching for recently seen resources.
// Use compression depending on the cache option.
unsigned codeCacheTag = cacheTag(CacheTagCode, cacheHandler);
CachedMetadata* codeCache = cacheHandler->cachedMetadata(codeCacheTag);
if (codeCache)
return bind(compileAndConsumeCache, cacheHandler, codeCacheTag, v8::ScriptCompiler::kConsumeCodeCache);
- if (!isResourceHotForCaching(cacheHandler, hotHours)) {
+ if (cacheOptions != V8CacheOptionsAlways && !isResourceHotForCaching(cacheHandler, hotHours)) {
V8ScriptRunner::setCacheTimeStamp(cacheHandler);
return bind(compileWithoutOptions, V8CompileHistogram::Cacheable);
}

Powered by Google App Engine
This is Rietveld 408576698