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

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: win_chromium_compile_dbg_ng is the worst 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..7b71d0cbec098deda5a83b2508288c8200c4fe0a 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, detach);
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();
@@ -108,7 +109,7 @@ private:
String m_characterEncoding;
String m_fallbackCharacterEncoding;
- PendingScript m_pendingScript;
+ OwnPtrWillBeMember<PendingScript> m_pendingScript;
bool m_parserInserted : 1;
bool m_isExternalScript : 1;
« no previous file with comments | « third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp ('k') | third_party/WebKit/Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698