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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 1733093002: [Test] have the provisional DocumentLoader protect itself (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/loader/DocumentLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
index d76d6e3208fb1cff218d29d6ee93b32c84f43535..ac01670abf4ef84b1aa11ad5f4b9182ca04d1875 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -93,6 +93,7 @@ DocumentLoader::DocumentLoader(LocalFrame* frame, const ResourceRequest& req, co
, m_navigationType(NavigationTypeOther)
, m_documentLoadTiming(*this)
, m_timeOfLastDataReceived(0.0)
+ , m_shouldProtect(false)
, m_applicationCacheHost(ApplicationCacheHost::create(this))
, m_state(NotStarted)
, m_inDataReceived(false)
@@ -242,6 +243,8 @@ void DocumentLoader::mainReceivedError(const ResourceError& error)
// but not loads initiated by child frames' data sources -- that's the WebFrame's job.
void DocumentLoader::stopLoading()
{
+ if (m_shouldProtect)
+ return;
RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame.get());
RefPtrWillBeRawPtr<DocumentLoader> protectLoader(this);
@@ -573,6 +576,8 @@ bool DocumentLoader::loadingMultipartContent() const
void DocumentLoader::detachFromFrame()
{
+ if (m_shouldProtect)
+ return;
ASSERT(m_frame);
RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame.get());
RefPtrWillBeRawPtr<DocumentLoader> protectLoader(this);
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.h ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698