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

Unified Diff: third_party/WebKit/Source/core/dom/PendingScript.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/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.

Powered by Google App Engine
This is Rietveld 408576698