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

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

Issue 1814853003: Track whether an element was inserted via document.write (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back to ps2 with some changes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2b79d305860151bcc0f487d735b3e87d1e570357..4c182c3a1c951d510579a3ff4d740dd13dd07480 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.h
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.h
@@ -38,9 +38,9 @@ class LocalFrame;
class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>, public ScriptResourceClient {
public:
- static RawPtr<ScriptLoader> create(Element* element, bool createdByParser, bool isEvaluated)
+ static RawPtr<ScriptLoader> create(Element* element, bool createdByParser, bool isEvaluated, bool createdDuringDocumentWrite = false)
{
- return new ScriptLoader(element, createdByParser, isEvaluated);
+ return new ScriptLoader(element, createdByParser, isEvaluated, createdDuringDocumentWrite);
}
~ScriptLoader() override;
@@ -85,8 +85,10 @@ public:
// Clears the connection to the PendingScript (and Element and Resource).
void detach();
+ bool wasCreatedDuringDocumentWrite() { return m_createdDuringDocumentWrite; }
+
protected:
- ScriptLoader(Element*, bool createdByParser, bool isEvaluated);
+ ScriptLoader(Element*, bool createdByParser, bool isEvaluated, bool createdDuringDocumentWrite);
private:
bool ignoresLoadRequest() const;
@@ -116,6 +118,7 @@ private:
bool m_willExecuteInOrder : 1;
bool m_willExecuteWhenDocumentFinishedParsing : 1;
bool m_forceAsync : 1;
+ const bool m_createdDuringDocumentWrite : 1;
Member<PendingScript> m_pendingScript;
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698