Summary: | RenderWidget::setWidgetGeometry() can end up destroying *this*. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | zalan <zalan> | ||||||||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, darin, esprehn+autocc, glenn, kling, kondapallykalyan | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
zalan
2015-05-04 15:26:51 PDT
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. 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. |