Esempio n. 1
0
ScriptResource* ScriptResource::fetch(FetchRequest& request,
                                      ResourceFetcher* fetcher) {
  DCHECK_EQ(request.resourceRequest().frameType(),
            WebURLRequest::FrameTypeNone);
  request.mutableResourceRequest().setRequestContext(
      WebURLRequest::RequestContextScript);
  ScriptResource* resource = toScriptResource(
      fetcher->requestResource(request, ScriptResourceFactory()));
  if (resource && !request.integrityMetadata().isEmpty())
    resource->setIntegrityMetadata(request.integrityMetadata());
  return resource;
}
Esempio n. 2
0
ResourcePtr<ScriptResource> ScriptResource::fetch(FetchRequest& request, ResourceFetcher* fetcher)
{
    ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone);
    request.mutableResourceRequest().setRequestContext(WebURLRequest::RequestContextScript);
    return toScriptResource(fetcher->requestResource(request, ScriptResourceFactory()));
}