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

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

Issue 2023683002: Tidy PendingScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove prefinalizer Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/PendingScript.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 58e04a51d879f37a31b6f6960e96aa442436d936..7c346a76a856bf78a012bedbd68c901918feb532 100644
--- a/third_party/WebKit/Source/core/dom/PendingScript.cpp
+++ b/third_party/WebKit/Source/core/dom/PendingScript.cpp
@@ -47,11 +47,12 @@ PendingScript::PendingScript(Element* element, ScriptResource* resource)
, m_client(nullptr)
{
setScriptResource(resource);
- ThreadState::current()->registerPreFinalizer(this);
}
PendingScript::~PendingScript()
{
+ // Verify explicit dispose().
+ CHECK(!m_client && !m_element && !m_streamer);
}
void PendingScript::dispose()
@@ -62,20 +63,6 @@ void PendingScript::dispose()
releaseElementAndClear();
}
-PendingScript& PendingScript::operator=(const PendingScript& other)
-{
- if (this == &other)
- return *this;
-
- 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;
- this->ResourceOwner<ScriptResource, ScriptResourceClient>::operator=(other);
- return *this;
-}
-
void PendingScript::watchForLoad(ScriptResourceClient* client)
{
DCHECK(!m_watchingForLoad);
« no previous file with comments | « third_party/WebKit/Source/core/dom/PendingScript.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698