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

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

Issue 866273005: Teach ScriptRunner how to yield and post on loading task queue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase try 2 Created 5 years, 10 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 | « Source/core/core.gypi ('k') | Source/core/dom/ScriptRunner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ScriptLoader.h
diff --git a/Source/core/dom/ScriptLoader.h b/Source/core/dom/ScriptLoader.h
index b805cd466db79d86c7be7b3764e323223f80b43d..7c2ce1b03107675ca6d4abc01b4f1f041438ad5d 100644
--- a/Source/core/dom/ScriptLoader.h
+++ b/Source/core/dom/ScriptLoader.h
@@ -36,7 +36,7 @@ class ScriptLoaderClient;
class ScriptSourceCode;
-class ScriptLoader final : public NoBaseWillBeGarbageCollectedFinalized<ScriptLoader>, private ScriptResourceClient {
+class ScriptLoader : public NoBaseWillBeGarbageCollectedFinalized<ScriptLoader>, private ScriptResourceClient {
public:
static PassOwnPtrWillBeRawPtr<ScriptLoader> create(Element* element, bool createdByParser, bool isEvaluated)
{
@@ -54,7 +54,7 @@ public:
String scriptCharset() const { return m_characterEncoding; }
String scriptContent() const;
void executeScript(const ScriptSourceCode&, double* compilationFinishTime = 0);
- void execute();
+ virtual void execute();
// XML parser calls these
void dispatchLoadEvent();
@@ -78,14 +78,15 @@ public:
void handleSourceAttribute(const String& sourceUrl);
void handleAsyncAttribute();
- bool isReady() const { return m_pendingScript.isReady(); }
+ virtual bool isReady() const { return m_pendingScript.isReady(); }
// Clears the connection to the PendingScript (and Element and Resource).
void detach();
-private:
+protected:
ScriptLoader(Element*, bool createdByParser, bool isEvaluated);
+private:
bool ignoresLoadRequest() const;
bool isScriptForEventSupported() const;
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/ScriptRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698