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

Side by Side Diff: third_party/WebKit/Source/core/dom/ScriptLoader.cpp

Issue 1914963002: Introduce v8-cache-strategies-for-cache-storage setting flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> 6 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 21 matching lines...) Expand all
32 #include "core/dom/ScriptLoaderClient.h" 32 #include "core/dom/ScriptLoaderClient.h"
33 #include "core/dom/ScriptRunner.h" 33 #include "core/dom/ScriptRunner.h"
34 #include "core/dom/ScriptableDocumentParser.h" 34 #include "core/dom/ScriptableDocumentParser.h"
35 #include "core/dom/Text.h" 35 #include "core/dom/Text.h"
36 #include "core/events/Event.h" 36 #include "core/events/Event.h"
37 #include "core/fetch/AccessControlStatus.h" 37 #include "core/fetch/AccessControlStatus.h"
38 #include "core/fetch/FetchRequest.h" 38 #include "core/fetch/FetchRequest.h"
39 #include "core/fetch/ResourceFetcher.h" 39 #include "core/fetch/ResourceFetcher.h"
40 #include "core/fetch/ScriptResource.h" 40 #include "core/fetch/ScriptResource.h"
41 #include "core/frame/LocalFrame.h" 41 #include "core/frame/LocalFrame.h"
42 #include "core/frame/Settings.h"
42 #include "core/frame/SubresourceIntegrity.h" 43 #include "core/frame/SubresourceIntegrity.h"
43 #include "core/frame/UseCounter.h" 44 #include "core/frame/UseCounter.h"
44 #include "core/frame/csp/ContentSecurityPolicy.h" 45 #include "core/frame/csp/ContentSecurityPolicy.h"
45 #include "core/html/CrossOriginAttribute.h" 46 #include "core/html/CrossOriginAttribute.h"
46 #include "core/html/HTMLScriptElement.h" 47 #include "core/html/HTMLScriptElement.h"
47 #include "core/html/imports/HTMLImport.h" 48 #include "core/html/imports/HTMLImport.h"
48 #include "core/html/parser/HTMLParserIdioms.h" 49 #include "core/html/parser/HTMLParserIdioms.h"
49 #include "core/inspector/ConsoleMessage.h" 50 #include "core/inspector/ConsoleMessage.h"
50 #include "core/svg/SVGScriptElement.h" 51 #include "core/svg/SVGScriptElement.h"
51 #include "platform/MIMETypeRegistry.h" 52 #include "platform/MIMETypeRegistry.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 request.setDefer(defer); 316 request.setDefer(defer);
316 317
317 String integrityAttr = m_element->fastGetAttribute(HTMLNames::integrityA ttr); 318 String integrityAttr = m_element->fastGetAttribute(HTMLNames::integrityA ttr);
318 if (!integrityAttr.isEmpty()) { 319 if (!integrityAttr.isEmpty()) {
319 IntegrityMetadataSet metadataSet; 320 IntegrityMetadataSet metadataSet;
320 SubresourceIntegrity::parseIntegrityAttribute(integrityAttr, metadat aSet, elementDocument); 321 SubresourceIntegrity::parseIntegrityAttribute(integrityAttr, metadat aSet, elementDocument);
321 request.setIntegrityMetadata(metadataSet); 322 request.setIntegrityMetadata(metadataSet);
322 } 323 }
323 324
324 m_resource = ScriptResource::fetch(request, elementDocument->fetcher()); 325 m_resource = ScriptResource::fetch(request, elementDocument->fetcher());
326 if (elementDocument->settings()) {
327 m_resource->setV8CacheStrategiesForCacheStorage(elementDocument->set tings()->v8CacheStrategiesForCacheStorage());
328 }
falken 2016/04/27 08:07:37 no braces to be consistent with rest of file
horo 2016/04/27 08:15:36 Done.
325 329
326 m_isExternalScript = true; 330 m_isExternalScript = true;
327 } 331 }
328 332
329 if (m_resource) 333 if (m_resource)
330 return true; 334 return true;
331 335
332 dispatchErrorEvent(); 336 dispatchErrorEvent();
333 return false; 337 return false;
334 } 338 }
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 if (isHTMLScriptLoader(element)) 527 if (isHTMLScriptLoader(element))
524 return toHTMLScriptElement(element)->loader(); 528 return toHTMLScriptElement(element)->loader();
525 529
526 if (isSVGScriptLoader(element)) 530 if (isSVGScriptLoader(element))
527 return toSVGScriptElement(element)->loader(); 531 return toSVGScriptElement(element)->loader();
528 532
529 return 0; 533 return 0;
530 } 534 }
531 535
532 } // namespace blink 536 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698