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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2393133005: Call LocalDOMWindow::clearDocument when a frame gets detached
Patch Set: temp Created 4 years 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 0fdb26ccb0f139a5f54035d955b156ae921ace7a..d6a2a7af6c450fce05ae93c35089200e64111a0c 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -4508,9 +4508,12 @@ void FrameView::updateRenderThrottlingStatusForTesting() {
void FrameView::updateRenderThrottlingStatus(bool hidden,
bool subtreeThrottled) {
+ if (!m_frame->document())
+ return;
+
TRACE_EVENT0("blink", "FrameView::updateRenderThrottlingStatus");
DCHECK(!isInPerformLayout());
- DCHECK(!m_frame->document() || !m_frame->document()->inStyleRecalc());
+ DCHECK(!m_frame->document()->inStyleRecalc());
bool wasThrottled = canThrottleRendering();
// Note that we disallow throttling of 0x0 frames because some sites use
@@ -4574,7 +4577,7 @@ void FrameView::updateRenderThrottlingStatus(bool hidden,
// recordDeferredLoadReason().
void FrameView::maybeRecordLoadReason() {
FrameView* parent = parentFrameView();
- if (frame().document()->frame()) {
+ if (frame().document() && frame().document()->frame()) {
if (!parent) {
HTMLFrameOwnerElement* element = frame().deprecatedLocalOwner();
if (!element)
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp ('k') | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698