bool ScriptResource::mustRefetchDueToIntegrityMetadata(const FetchRequest& request) const { if (request.integrityMetadata().isEmpty()) return false; return !IntegrityMetadata::setsEqual(m_integrityMetadata, request.integrityMetadata()); }
ResourcePtr<ScriptResource> ScriptResource::fetch(FetchRequest& request, ResourceFetcher* fetcher) { ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone); request.mutableResourceRequest().setRequestContext(WebURLRequest::RequestContextScript); ResourcePtr<ScriptResource> resource = toScriptResource(fetcher->requestResource(request, ScriptResourceFactory())); if (resource && !request.integrityMetadata().isEmpty()) resource->setIntegrityMetadata(request.integrityMetadata()); return resource; }