RESOLVED FIXED 104961
Add a missing nullity check in RenderObject::containingBlock
https://bugs.webkit.org/show_bug.cgi?id=104961
Summary Add a missing nullity check in RenderObject::containingBlock
vollick
Reported 2012-12-13 14:52:42 PST
At one point we assert that !o->isAnonymousBlock(), but it's quite possible that o is null.
Attachments
Patch (1.52 KB, patch)
2012-12-13 14:54 PST, vollick
no flags
vollick
Comment 1 2012-12-13 14:54:04 PST
Adrienne Walker
Comment 2 2012-12-13 14:59:18 PST
Comment on attachment 179347 [details] Patch R=me. That looks safe. Later in the function there's a similar !o || !o->foo() assert.
WebKit Review Bot
Comment 3 2012-12-13 15:53:36 PST
Comment on attachment 179347 [details] Patch Clearing flags on attachment: 179347 Committed r137674: <http://trac.webkit.org/changeset/137674>
WebKit Review Bot
Comment 4 2012-12-13 15:53:39 PST
All reviewed patches have been landed. Closing bug.
Alexey Proskuryakov
Comment 5 2012-12-13 18:19:18 PST
Why didn't this patch have a regression test? It's not OK to ignore those for fixes made through code inspection (I'd say that it's even more important for those fixes).
vollick
Comment 6 2012-12-13 19:33:37 PST
(In reply to comment #5) > Why didn't this patch have a regression test? It's not OK to ignore those for fixes made through code inspection (I'd say that it's even more important for those fixes). This patch was not initiated by code inspection, it was made to fix a debug-only crash in a layout test http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=fullscreen%2Ffull-screen-fixed-pos-parent.html%2Cfullscreen%2Ffull-screen-iframe-without-allow-attribute-allowed-from-parent.html The crash resulted from asking a valid RenderObject what its containing block was -- something that, I believe, shouldn't run you the risk of crashing -- and appeared to be an oversight when the assertion was written.
Note You need to log in before you can comment on or make changes to this bug.