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

Unified Diff: third_party/WebKit/Source/core/dom/PendingScript.cpp

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.cpp
diff --git a/third_party/WebKit/Source/core/dom/PendingScript.cpp b/third_party/WebKit/Source/core/dom/PendingScript.cpp
index ba3e8a5bbcfd28a4ae5cca10beb104b6a014111c..759dc8c7fa0f2ceb074cbd6bb89c97fa4db0c20b 100644
--- a/third_party/WebKit/Source/core/dom/PendingScript.cpp
+++ b/third_party/WebKit/Source/core/dom/PendingScript.cpp
@@ -26,7 +26,6 @@
#include "core/dom/PendingScript.h"
#include "bindings/core/v8/ScriptSourceCode.h"
-#include "bindings/core/v8/ScriptStreamer.h"
#include "core/dom/Element.h"
#include "core/fetch/ScriptResource.h"
#include "core/frame/SubresourceIntegrity.h"
@@ -34,11 +33,9 @@
namespace blink {
-PendingScript::PendingScript()
- : m_watchingForLoad(false)
- , m_startingPosition(TextPosition::belowRangePosition())
- , m_integrityFailure(false)
+PassOwnPtrWillBeRawPtr<PendingScript> PendingScript::create(Element* element, ScriptResource* resource)
{
+ return adoptPtrWillBeNoop(new PendingScript(element, resource));
}
PendingScript::PendingScript(Element* element, ScriptResource* resource)
@@ -49,17 +46,6 @@ PendingScript::PendingScript(Element* element, ScriptResource* resource)
setScriptResource(resource);
}
-PendingScript::PendingScript(const PendingScript& other)
- : ResourceOwner(other)
- , m_watchingForLoad(other.m_watchingForLoad)
- , m_element(other.m_element)
- , m_startingPosition(other.m_startingPosition)
- , m_integrityFailure(other.m_integrityFailure)
- , m_streamer(other.m_streamer)
-{
- setScriptResource(other.resource());
-}
-
PendingScript::~PendingScript()
{
}
@@ -185,6 +171,7 @@ DEFINE_TRACE(PendingScript)
{
visitor->trace(m_element);
visitor->trace(m_streamer);
+ ResourceOwner<ScriptResource>::trace(visitor);
}
ScriptSourceCode PendingScript::getSource(const KURL& documentURL, bool& errorOccurred) const
« no previous file with comments | « third_party/WebKit/Source/core/dom/PendingScript.h ('k') | third_party/WebKit/Source/core/dom/ProcessingInstruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698