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

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

Issue 2436623004: [Fetch, Loader] Expect on-heap objects will never get destroyed with a reference (Closed)
Patch Set: fix Created 4 years, 2 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/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 21ebb27a45c63282e458d10566a91706d621b098..795cf5d72f252de70b236085b74eae72a8d46baf 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -354,9 +354,6 @@ void FrameLoader::replaceDocumentWhileExecutingJavaScriptURL(
Document::NoDismissal)
return;
- // DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL can cause the
- // DocumentLoader to get deref'ed and possible destroyed, so protect it with a
- // RefPtr.
DocumentLoader* documentLoader(m_frame->document()->loader());
UseCounter::count(*m_frame->document(),
@@ -609,7 +606,7 @@ void FrameLoader::finishedParsing() {
checkCompleted();
if (!m_frame->view())
- return; // We are being destroyed by something checkCompleted called.
+ return;
// Check if the scrollbars are really needed for the content. If not, remove
// them, relayout, and repaint.

Powered by Google App Engine
This is Rietveld 408576698