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. |
haraken
2014/05/29 01:46:08
Just help me understand: What prevents us from mak
sof
2014/05/29 06:02:07
This goes to the core of this CL. If they move to
haraken
2014/05/29 11:32:08
Just help me understand: Where does ~PendingScript
sof
2014/05/29 20:39:54
If you look at ResourceOwner<>::setResource() (Pen
haraken
2014/05/30 01:28:50
I understand your point, but my question is:
If w
sof
2014/05/30 06:26:40
I just don't see how to correctly address the Reso
haraken
2014/05/30 06:49:42
Understood. I'm just wondering if we can eliminate
sof
2014/05/30 09:43:40
The problem is that PendingScript contains a Resou
|
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; |
haraken
2014/05/29 01:46:08
The raw pointers in the key looks safe, since they
|