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

Unified Diff: third_party/WebKit/Source/core/dom/ScriptLoader.h

Issue 2260303002: Sending an async GET request for doc.written blocked scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extra new lines removed Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698