| 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;
|
|
|