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

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

Issue 298863010: Oilpan: have PendingScripts trace their script elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Trace HTMLScriptRunnerHost from HTMLScriptRunner Created 6 years, 7 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 b47139c86298105a835a442ce1ac0e1d07cc64aa..a24ca26a090b3ccbd33410688deb5c0a3eecf048 100644
--- a/Source/core/dom/ScriptRunner.h
+++ b/Source/core/dom/ScriptRunner.h
@@ -28,6 +28,7 @@
#include "core/fetch/ResourcePtr.h"
#include "platform/Timer.h"
+#include "platform/heap/Handle.h"
#include "wtf/HashMap.h"
#include "wtf/Noncopyable.h"
#include "wtf/PassOwnPtr.h"
@@ -40,10 +41,13 @@ class Document;
class PendingScript;
class ScriptLoader;
-class ScriptRunner {
- WTF_MAKE_NONCOPYABLE(ScriptRunner); WTF_MAKE_FAST_ALLOCATED;
+class ScriptRunner FINAL : public NoBaseWillBeGarbageCollectedFinalized<ScriptRunner> {
+ WTF_MAKE_NONCOPYABLE(ScriptRunner); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
public:
- static PassOwnPtr<ScriptRunner> create(Document* document) { return adoptPtr(new ScriptRunner(document)); }
+ static PassOwnPtrWillBeRawPtr<ScriptRunner> create(Document* document)
+ {
+ return adoptPtrWillBeNoop(new ScriptRunner(document));
+ }
~ScriptRunner();
enum ExecutionType { ASYNC_EXECUTION, IN_ORDER_EXECUTION };
@@ -54,12 +58,16 @@ public:
void notifyScriptReady(ScriptLoader*, ExecutionType);
void notifyScriptLoadError(ScriptLoader*, ExecutionType);
+ void trace(Visitor*);
+
private:
explicit ScriptRunner(Document*);
void timerFired(Timer<ScriptRunner>*);
- Document* m_document;
+ RawPtrWillBeMember<Document> m_document;
+ // 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
HashMap<ScriptLoader*, PendingScript> m_pendingAsyncScripts;
« 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