Commit f17b2cd3 authored by Mythri Alle's avatar Mythri Alle Committed by Commit Bot

Update ResourceLoader to also fetch cached code for inline scripts

V8 also stores code caches for inline scripts in the html resources.
This cl updates ResourceLoader to fetch cached code for inline scripts
in MainResources.

Bug: chromium:880212, chromium:812168
Change-Id: I822453b52897aac292444df20e50937d8198064d
Reviewed-on: https://chromium-review.googlesource.com/1208391Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589137}
parent 86a630eb
...@@ -306,7 +306,10 @@ bool ResourceLoader::ShouldFetchCodeCache() { ...@@ -306,7 +306,10 @@ bool ResourceLoader::ShouldFetchCodeCache() {
return false; return false;
if (request.DownloadToBlob()) if (request.DownloadToBlob())
return false; return false;
if (resource_->GetType() != Resource::Type::kScript) // If the resource type is script or MainResource (for inline scripts) fetch
// code cache. For others we need not fetch code cache.
if (resource_->GetType() != Resource::Type::kScript &&
resource_->GetType() != Resource::Type::kMainResource)
return false; return false;
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment