Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/PendingScript.h |
| diff --git a/third_party/WebKit/Source/core/dom/PendingScript.h b/third_party/WebKit/Source/core/dom/PendingScript.h |
| index 1fdf269c29689b6ff6ec47b772b7ca705c72961b..605738390e6719ccc84093e439ccd9d1c43dd43f 100644 |
| --- a/third_party/WebKit/Source/core/dom/PendingScript.h |
| +++ b/third_party/WebKit/Source/core/dom/PendingScript.h |
| @@ -42,11 +42,12 @@ class ScriptSourceCode; |
| // A container for an external script which may be loaded and executed. |
| // |
| -// A ResourcePtr alone does not prevent the underlying Resource |
| +// A RefPtr 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 CORE_EXPORT PendingScript final : public NoBaseWillBeGarbageCollectedFinalized<PendingScript>, public ResourceOwner<ScriptResource> { |
| WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PendingScript); |
| + WILL_BE_USING_PRE_FINALIZER(PendingScript, dispose); |
| public: |
| static PassOwnPtrWillBeRawPtr<PendingScript> create(Element*, ScriptResource*); |
| ~PendingScript() override; |
| @@ -74,9 +75,12 @@ public: |
| ScriptSourceCode getSource(const KURL& documentURL, bool& errorOccurred) const; |
| void setStreamer(PassRefPtrWillBeRawPtr<ScriptStreamer>); |
| + void streamingFinished(); |
| bool isReady() const; |
| + void dispose(); |
| + |
| private: |
| PendingScript(Element*, ScriptResource*); |
| @@ -86,6 +90,7 @@ private: |
| bool m_integrityFailure; |
| RefPtrWillBeMember<ScriptStreamer> m_streamer; |
| + ScriptResourceClient* m_client; |
|
haraken
2016/02/04 23:56:30
In long term, we want to move ResourceClients to O
Nate Chapin
2016/02/06 00:34:07
Yep, someday :)
|
| }; |
| } // namespace blink |