Bug 118768 - Remove a bunch of redundant checks for empty string in StringImpl
Summary: Remove a bunch of redundant checks for empty string in StringImpl
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-16 20:50 PDT by Benjamin Poulain
Modified: 2013-08-02 20:32 PDT (History)
2 users (show)

See Also:


Attachments
Patch (7.25 KB, patch)
2013-07-16 21:40 PDT, Benjamin Poulain
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2013-07-16 20:50:54 PDT
Remove a bunch of redundant checks for empty string in StringImpl
Comment 1 Benjamin Poulain 2013-07-16 21:40:33 PDT
Created attachment 206850 [details]
Patch
Comment 2 Ryosuke Niwa 2013-08-01 21:06:44 PDT
Comment on attachment 206850 [details]
Patch

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

> Source/WTF/wtf/text/StringImpl.cpp:416
>          int32_t length = m_length;

Can we add an assertion that m_length is non-zero here?

> Source/WTF/wtf/text/StringImpl.cpp:448
>  

Ditto.
Comment 3 Benjamin Poulain 2013-08-02 20:32:17 PDT
Committed r153686: <http://trac.webkit.org/changeset/153686>