Refcount RenderWidget so that we don't end up with an invalid *this* during layout.
rdar://problem/20753994
Created attachment 252342 [details] Patch
Comment on attachment 252342 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252342&action=review > Source/WebCore/rendering/RenderView.cpp:361 > + releaseProtectedRenderWidgets(); Let's move this to FrameView instead so it also works for subtree layouts. > Source/WebCore/rendering/RenderWidget.h:77 > + inline void ref() { ++m_refCount; } No need to specify "inline" here.
Created attachment 252350 [details] Patch
Comment on attachment 252350 [details] Patch r=me
Comment on attachment 252350 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252350&action=review > Source/WebCore/rendering/RenderObject.cpp:2028 > + if (is<RenderWidget>(this)) { if (is<RenderWidget>(*this)) to avoid unnecessary null check > Source/WebCore/rendering/RenderObject.cpp:2029 > + downcast<RenderWidget>(this)->deref(); We usually do: downcast<RenderWidget>(*this).deref();
Created attachment 252351 [details] Patch
Created attachment 252353 [details] Patch
Comment on attachment 252353 [details] Patch Clearing flags on attachment: 252353 Committed r183788: <http://trac.webkit.org/changeset/183788>
All reviewed patches have been landed. Closing bug.
Iām disappointed that we have to add back the reference counting here. And doubly disappointed that we are not using the RefCounted template for the reference counting.