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..1fdf269c29689b6ff6ec47b772b7ca705c72961b 100644 |
--- a/third_party/WebKit/Source/core/dom/PendingScript.h |
+++ b/third_party/WebKit/Source/core/dom/PendingScript.h |
@@ -26,6 +26,7 @@ |
#ifndef PendingScript_h |
#define PendingScript_h |
+#include "bindings/core/v8/ScriptStreamer.h" |
#include "core/CoreExport.h" |
#include "core/fetch/ResourceOwner.h" |
#include "core/fetch/ScriptResource.h" |
@@ -38,26 +39,17 @@ namespace blink { |
class Element; |
class ScriptSourceCode; |
-class ScriptStreamer; |
// A container for an external script which may be loaded and executed. |
// |
// 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, |
- Deferred, |
- Async |
- }; |
- |
- PendingScript(); |
- PendingScript(Element*, ScriptResource*); |
- PendingScript(const PendingScript&); |
- ~PendingScript(); |
+ static PassOwnPtrWillBeRawPtr<PendingScript> create(Element*, ScriptResource*); |
+ ~PendingScript() override; |
PendingScript& operator=(const PendingScript&); |
@@ -86,6 +78,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. |