Bug 155775 - Use references instead of pointers for absolute positioning code
Summary: Use references instead of pointers for absolute positioning code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-22 16:37 PDT by Myles C. Maxfield
Modified: 2016-03-22 17:58 PDT (History)
11 users (show)

See Also:


Attachments
Patch (69.13 KB, patch)
2016-03-22 16:38 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2016-03-22 16:37:05 PDT
Use references instead of pointers for absolute positioning code
Comment 1 Myles C. Maxfield 2016-03-22 16:38:24 PDT
Created attachment 274699 [details]
Patch
Comment 2 Simon Fraser (smfr) 2016-03-22 16:55:18 PDT
Comment on attachment 274699 [details]
Patch

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

> Source/WebCore/rendering/RenderTable.cpp:275
> -    RenderBlock* cb = containingBlock();
> +    RenderBlock& cb = *containingBlock();

Nope. containingBlock() can return nullptr.
Comment 3 Myles C. Maxfield 2016-03-22 17:00:46 PDT
(In reply to comment #2)
> Comment on attachment 274699 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=274699&action=review
> 
> > Source/WebCore/rendering/RenderTable.cpp:275
> > -    RenderBlock* cb = containingBlock();
> > +    RenderBlock& cb = *containingBlock();
> 
> Nope. containingBlock() can return nullptr.

It can, but we immediately dereference it. Therefore, it must not return nullptr here.

Every change in this patch is of this form.
Comment 4 WebKit Commit Bot 2016-03-22 17:58:36 PDT
Comment on attachment 274699 [details]
Patch

Clearing flags on attachment: 274699

Committed r198568: <http://trac.webkit.org/changeset/198568>
Comment 5 WebKit Commit Bot 2016-03-22 17:58:41 PDT
All reviewed patches have been landed.  Closing bug.