Bug 71980

Summary: Remove unneeded frame check in FrameView::detachCustomScrollbars
Product: WebKit Reporter: Julien Chaffraix <jchaffraix>
Component: FramesAssignee: Julien Chaffraix <jchaffraix>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Trivial change: remove the check. none

Description Julien Chaffraix 2011-11-09 17:48:50 PST
Looks like this is a left-over from several refactorings that changed the function.

The remainder of detachCustomScrollbars definitely does not care about having a Frame.

Patch forthcoming.
Comment 1 Julien Chaffraix 2011-11-09 17:52:19 PST
Created attachment 114412 [details]
Trivial change: remove the check.
Comment 2 Anders Carlsson 2011-11-10 12:15:40 PST
Comment on attachment 114412 [details]
Trivial change: remove the check.

Can you remove this because m_frame is never going to be null, or because m_frame is never dereferenced? If it is because m_frame is never going to be null, you can assert that.
Comment 3 Julien Chaffraix 2011-11-10 16:54:32 PST
(In reply to comment #2)
> (From update of attachment 114412 [details])
> Can you remove this because m_frame is never going to be null, or because m_frame is never dereferenced? If it is because m_frame is never going to be null, you can assert that.

The latter I am afraid: AFAICT this check was introduced because we would crash if we did not check the Frame but the code has changed and this check is not needed anymore.
Comment 4 WebKit Review Bot 2011-11-11 14:01:42 PST
Comment on attachment 114412 [details]
Trivial change: remove the check.

Clearing flags on attachment: 114412

Committed r100014: <http://trac.webkit.org/changeset/100014>
Comment 5 WebKit Review Bot 2011-11-11 14:01:46 PST
All reviewed patches have been landed.  Closing bug.