Bug 64342 - Simplify logic in ResourceResponse::nsURLResponse
Summary: Simplify logic in ResourceResponse::nsURLResponse
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-11 22:30 PDT by Pratik Solanki
Modified: 2011-07-11 22:30 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pratik Solanki 2011-07-11 22:30:58 PDT
In the review for the fix for bug 63286, David Kilzer notes <https://bugs.webkit.org/show_bug.cgi?id=63286#c5>

> Is there ever a case where you have an m_nsResponse but not a m_cfResponse (in which case you could
> make the m_cfResponse from the m_nsResponse)?  Or is this ASSERT-ed elsewhere during construction
> so it's not possible to get into this state?
> 
> Could some of this logic be simplified by doing an early return if m_isNull is true:
>
>    if (m_isNull)
>        return nil;

IIRC the code is a bit convoluted due to some layout test failures I had run into. But we should revisit it. I think it can be simplified.