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

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

Issue 669503003: Revert of Refactor Script(Loader|Runner): don't access Resources all over the place... (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/dom/ScriptLoader.cpp ('k') | Source/core/dom/ScriptRunner.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ScriptRunner.h
diff --git a/Source/core/dom/ScriptRunner.h b/Source/core/dom/ScriptRunner.h
index e3236475d30eb1d3f5c92d34e6bfc0c1e8177bc0..ffd7bf2e9f80bf06c6fd0e4b4b79c7a7863055a9 100644
--- a/Source/core/dom/ScriptRunner.h
+++ b/Source/core/dom/ScriptRunner.h
@@ -38,6 +38,7 @@
class ScriptResource;
class Document;
+class PendingScript;
class ScriptLoader;
class ScriptRunner final : public NoBaseWillBeGarbageCollectedFinalized<ScriptRunner> {
@@ -50,7 +51,7 @@
~ScriptRunner();
enum ExecutionType { ASYNC_EXECUTION, IN_ORDER_EXECUTION };
- void queueScriptForExecution(ScriptLoader*, ExecutionType);
+ void queueScriptForExecution(ScriptLoader*, ResourcePtr<ScriptResource>, ExecutionType);
bool hasPendingScripts() const { return !m_scriptsToExecuteSoon.isEmpty() || !m_scriptsToExecuteInOrder.isEmpty() || !m_pendingAsyncScripts.isEmpty(); }
void suspend();
void resume();
@@ -66,12 +67,14 @@
void timerFired(Timer<ScriptRunner>*);
- void addPendingAsyncScript(ScriptLoader*);
+ void addPendingAsyncScript(ScriptLoader*, const PendingScript&);
RawPtrWillBeMember<Document> m_document;
- Vector<ScriptLoader*> m_scriptsToExecuteInOrder;
- Vector<ScriptLoader*> m_scriptsToExecuteSoon; // http://www.whatwg.org/specs/web-apps/current-work/#set-of-scripts-that-will-execute-as-soon-as-possible
- HashSet<ScriptLoader*> m_pendingAsyncScripts;
+ // FIXME: Oilpan: consider using heap vectors and hash map here;
+ // PendingScript does have a (trivial) destructor, however.
+ Vector<PendingScript> m_scriptsToExecuteInOrder;
+ Vector<PendingScript> m_scriptsToExecuteSoon; // http://www.whatwg.org/specs/web-apps/current-work/#set-of-scripts-that-will-execute-as-soon-as-possible
+ WillBeHeapHashMap<ScriptLoader*, PendingScript> m_pendingAsyncScripts;
Timer<ScriptRunner> m_timer;
};
« no previous file with comments | « Source/core/dom/ScriptLoader.cpp ('k') | Source/core/dom/ScriptRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698