Bug 62792 - Add an assertion that percent height box is unregistered correctly
Summary: Add an assertion that percent height box is unregistered correctly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Normal
Assignee: Kent Tamura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-16 02:03 PDT by Kent Tamura
Modified: 2011-07-05 02:31 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.54 KB, patch)
2011-06-16 02:07 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 2 (3.48 KB, patch)
2011-07-05 01:44 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2011-06-16 02:03:47 PDT
gPercentHeightDescendantsMap in RenderBlock tracks boxes with a percent height.
It would be possible that gPercentHeightDescendantsMap contains a stale pointer if a height of a RenderStyle was updated in layout().

I don't think we have such code at this moment.  I had this problem with my local change.
Comment 1 Kent Tamura 2011-06-16 02:07:56 PDT
Created attachment 97424 [details]
Patch
Comment 2 Hajime Morrita 2011-07-04 23:18:58 PDT
Comment on attachment 97424 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=97424&action=review

> Source/WebCore/rendering/RenderBlock.cpp:3424
> +#ifndef NDEBUG

I found that we have a preprocessor symbol  called ASSERT_DISABLED.
Comment 3 Kent Tamura 2011-07-05 01:44:20 PDT
Created attachment 99680 [details]
Patch 2

Chekcs ASSERT_DISABLED
Comment 4 Kent Tamura 2011-07-05 01:45:43 PDT
Comment on attachment 97424 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=97424&action=review

>> Source/WebCore/rendering/RenderBlock.cpp:3424
>> +#ifndef NDEBUG
> 
> I found that we have a preprocessor symbol  called ASSERT_DISABLED.

Yes, ASSERT_DISABLED is better.  I have updated the patch.
Comment 5 Hajime Morrita 2011-07-05 01:49:30 PDT
Comment on attachment 99680 [details]
Patch 2

Assertion failure should be better than use-after-free.
Comment 6 WebKit Review Bot 2011-07-05 02:31:37 PDT
Comment on attachment 99680 [details]
Patch 2

Clearing flags on attachment: 99680

Committed r90388: <http://trac.webkit.org/changeset/90388>
Comment 7 WebKit Review Bot 2011-07-05 02:31:42 PDT
All reviewed patches have been landed.  Closing bug.