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

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

Issue 2563313002: Clear the owner element's widget in Document::shutdown(). (Closed)
Patch Set: Missing semicolon. 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
« no previous file with comments | « no previous file | 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 196f562691e386f9bdd7377e29038afb9aec1869..fe182f1b2001d9204bbd5bef927f82641fa694ae 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -350,9 +350,13 @@ void FrameView::dispose() {
// FIXME: Do we need to do something here for OOPI?
HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner();
- // TODO(dcheng): It seems buggy that we can have an owner element that
- // points to another Widget.
- if (ownerElement && ownerElement->ownedWidget() == this)
+ // TODO(dcheng): It seems buggy that we can have an owner element that points
+ // to another Widget. This can happen when a plugin element loads a frame
+ // (widget A of type FrameView) and then loads a plugin (widget B of type
+ // WebPluginContainerImpl). In this case, the frame's view is A and the frame
+ // element's owned widget is B. See https://crbug.com/673170 for an example.
+ // DCHECK(ownerElement->ownedWidget() == this);
dcheng 2016/12/14 02:23:00 Nit: let's remove commented out code. I don't thi
Mariusz Mlynski 2016/12/14 02:36:50 This code is what @esprehn asked for :D I think we
+ if (ownerElement)
ownerElement->setWidget(nullptr);
#if ENABLE(ASSERT)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698