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

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

Issue 1569273004: Move ResourceOwner on to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: third_party/WebKit/Source/core/dom/ScriptLoader.h
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.h b/third_party/WebKit/Source/core/dom/ScriptLoader.h
index 6b53a6656812d0dddcb6820ace7ca86db20bc008..8508806d4f1ec05a2930a5a5e6dd2fe6b9bc0e23 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.h
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.h
@@ -39,6 +39,7 @@ class LocalFrame;
class CORE_EXPORT ScriptLoader : public NoBaseWillBeGarbageCollectedFinalized<ScriptLoader>, private ScriptResourceClient {
USING_FAST_MALLOC_WILL_BE_REMOVED(ScriptLoader);
+ WILL_BE_USING_PRE_FINALIZER(ScriptLoader, dispose);
public:
static PassOwnPtrWillBeRawPtr<ScriptLoader> create(Element* element, bool createdByParser, bool isEvaluated)
{
@@ -81,7 +82,7 @@ public:
void handleSourceAttribute(const String& sourceUrl);
void handleAsyncAttribute();
- virtual bool isReady() const { return m_pendingScript.isReady(); }
+ virtual bool isReady() const { return m_pendingScript && m_pendingScript->isReady(); }
// Clears the connection to the PendingScript (and Element and Resource).
void detach();
@@ -98,6 +99,8 @@ private:
ScriptLoaderClient* client() const;
+ void dispose();
+
// ResourceClient
void notifyFinished(Resource*) override;
String debugName() const override { return "ScriptLoader"; }
@@ -108,7 +111,7 @@ private:
String m_characterEncoding;
String m_fallbackCharacterEncoding;
- PendingScript m_pendingScript;
+ OwnPtrWillBeMember<PendingScript> m_pendingScript;
bool m_parserInserted : 1;
bool m_isExternalScript : 1;

Powered by Google App Engine
This is Rietveld 408576698