Index: third_party/WebKit/Source/core/dom/ScriptLoader.h |
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.h b/third_party/WebKit/Source/core/dom/ScriptLoader.h |
index 24f3ebd7e0b67ad6d76412f07751c1a0f73a65fe..a0c72bd39bd5d4780b25d9493958338e160109a5 100644 |
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.h |
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.h |
@@ -39,9 +39,9 @@ class LocalFrame; |
class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>, public ScriptResourceClient { |
USING_GARBAGE_COLLECTED_MIXIN(ScriptLoader); |
public: |
- static ScriptLoader* create(Element* element, bool createdByParser, bool isEvaluated, bool createdDuringDocumentWrite = false) |
+ static ScriptLoader* create(Element* element, bool createdByParser, bool isEvaluated, bool createdDuringDocumentWrite = false, bool blockedDocWriteScriptAsyncFetch = false) |
{ |
- return new ScriptLoader(element, createdByParser, isEvaluated, createdDuringDocumentWrite); |
+ return new ScriptLoader(element, createdByParser, isEvaluated, createdDuringDocumentWrite, blockedDocWriteScriptAsyncFetch); |
} |
~ScriptLoader() override; |
@@ -88,8 +88,10 @@ public: |
bool wasCreatedDuringDocumentWrite() { return m_createdDuringDocumentWrite; } |
+ bool disallowedFetchForDocWrittenScript() { return m_disallowedFetchForDocWrittenScript; } |
+ |
protected: |
- ScriptLoader(Element*, bool createdByParser, bool isEvaluated, bool createdDuringDocumentWrite); |
+ ScriptLoader(Element*, bool createdByParser, bool isEvaluated, bool createdDuringDocumentWrite, bool blockedDocWriteScriptAsyncFetch); |
private: |
bool ignoresLoadRequest() const; |
@@ -120,12 +122,12 @@ private: |
bool m_willExecuteWhenDocumentFinishedParsing : 1; |
bool m_forceAsync : 1; |
const bool m_createdDuringDocumentWrite : 1; |
+ bool m_disallowedFetchForDocWrittenScript : 1; // This script will be blocked if not present in http cache. |
Charlie Harrison
2016/08/19 21:24:27
Can these be combined into an enum flag?
shivanisha
2016/08/22 16:15:21
Done for readability and the fact that both of the
|
+ const bool m_blockedDocWriteScriptAsyncFetch : 1; // Non parser-blocking lowest priority fetch for the blocked script. |
Charlie Harrison
2016/08/19 21:24:27
The comment here doesn't really specify what the "
shivanisha
2016/08/22 16:15:21
done.
|
Member<PendingScript> m_pendingScript; |
}; |
- |
ScriptLoader* toScriptLoaderIfPossible(Element*); |
- |
} // namespace blink |
#endif // ScriptLoader_h |