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

Unified Diff: Source/core/dom/PendingScript.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/Document.cpp ('k') | Source/core/dom/PendingScript.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/PendingScript.h
diff --git a/Source/core/dom/PendingScript.h b/Source/core/dom/PendingScript.h
index a5c5855819c11fa1bd04f3e38f9388af6b5d1fb9..8237aa9924f1468e3d7889531f438e3dfbe84354 100644
--- a/Source/core/dom/PendingScript.h
+++ b/Source/core/dom/PendingScript.h
@@ -29,6 +29,7 @@
#include "core/fetch/ResourceClient.h"
#include "core/fetch/ResourceOwner.h"
#include "core/fetch/ScriptResource.h"
+#include "platform/heap/Handle.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/text/TextPosition.h"
@@ -43,7 +44,8 @@ class ScriptResource;
// A ResourcePtr alone does not prevent the underlying Resource
// from purging its data buffer. This class holds a dummy client open for its
// lifetime in order to guarantee that the data buffer will not be purged.
-class PendingScript : public ResourceOwner<ScriptResource> {
+class PendingScript FINAL : public ResourceOwner<ScriptResource> {
+ ALLOW_ONLY_INLINE_ALLOCATION();
public:
PendingScript()
: m_watchingForLoad(false)
@@ -90,15 +92,17 @@ public:
Element* element() const { return m_element.get(); }
void setElement(Element* element) { m_element = element; }
- PassRefPtr<Element> releaseElementAndClear();
+ PassRefPtrWillBeRawPtr<Element> releaseElementAndClear();
void setScriptResource(ScriptResource*);
virtual void notifyFinished(Resource*);
+ void trace(Visitor*);
+
private:
bool m_watchingForLoad;
- RefPtr<Element> m_element;
+ RefPtrWillBeMember<Element> m_element;
TextPosition m_startingPosition; // Only used for inline script tags.
};
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/PendingScript.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698