| 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 4f42d098a0083e47fbbd0c7c34036bb16972bdd3..58e5c98b715de58f6776ed360d184789d275e94e 100644
|
| --- a/third_party/WebKit/Source/core/dom/PendingScript.h
|
| +++ b/third_party/WebKit/Source/core/dom/PendingScript.h
|
| @@ -27,6 +27,7 @@
|
| #define PendingScript_h
|
|
|
| #include "core/CoreExport.h"
|
| +#include "core/dom/Element.h"
|
| #include "core/fetch/ResourceOwner.h"
|
| #include "core/fetch/ScriptResource.h"
|
| #include "platform/heap/Handle.h"
|
| @@ -36,7 +37,6 @@
|
|
|
| namespace blink {
|
|
|
| -class Element;
|
| class ScriptSourceCode;
|
| class ScriptStreamer;
|
|
|
| @@ -45,8 +45,8 @@ class ScriptStreamer;
|
| // 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 CORE_EXPORT PendingScript final : public ResourceOwner<ScriptResource> {
|
| - DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
|
| +class CORE_EXPORT PendingScript final : public NoBaseWillBeGarbageCollectedFinalized<PendingScript>, public ResourceOwner<ScriptResource> {
|
| + WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PendingScript);
|
| public:
|
| enum Type {
|
| ParsingBlocking,
|
| @@ -54,10 +54,11 @@ public:
|
| Async
|
| };
|
|
|
| - PendingScript();
|
| - PendingScript(Element*, ScriptResource*);
|
| - PendingScript(const PendingScript&);
|
| - ~PendingScript();
|
| + static PassOwnPtrWillBeRawPtr<PendingScript> create(Element* element, ScriptResource* resource)
|
| + {
|
| + return adoptPtrWillBeNoop(new PendingScript(element, resource));
|
| + }
|
| + ~PendingScript() override;
|
|
|
| PendingScript& operator=(const PendingScript&);
|
|
|
| @@ -86,6 +87,8 @@ public:
|
| bool isReady() const;
|
|
|
| private:
|
| + PendingScript(Element*, ScriptResource*);
|
| +
|
| bool m_watchingForLoad;
|
| RefPtrWillBeMember<Element> m_element;
|
| TextPosition m_startingPosition; // Only used for inline script tags.
|
|
|