Commit 410fdcf2 authored by Mythri Alle's avatar Mythri Alle Committed by Commit Bot

Reland "Update ResourceLoader to also fetch cached code for inline scripts"

This is a reland of f17b2cd3

Original change's description:
> 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/1208391
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#589137}

Bug: chromium:880212, chromium:812168
Change-Id: I5d0d38bf89de68d6fe88324a42742b2dfac3be96
Reviewed-on: https://chromium-review.googlesource.com/1215326Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590213}
parent f8d8a935
......@@ -306,7 +306,10 @@ bool ResourceLoader::ShouldFetchCodeCache() {
return false;
if (request.DownloadToBlob())
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 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