Bug 212386

Summary: Enhance Bitmap::setEachNthBit() to also take an end index.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: Web Template FrameworkAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, ews-watchlist, rmorisset, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch. rmorisset: review+

Description Mark Lam 2020-05-26 14:51:59 PDT
Previously, it was only taking the n interval, and the start index.
Comment 1 Radar WebKit Bug Importer 2020-05-26 14:52:24 PDT
<rdar://problem/63643324>
Comment 2 Mark Lam 2020-05-26 14:57:40 PDT
Created attachment 400279 [details]
proposed patch.
Comment 3 Robin Morisset 2020-05-26 15:13:20 PDT
Comment on attachment 400279 [details]
proposed patch.

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

r=me

> Source/WTF/wtf/Bitmap.h:436
> +    ASSERT(start <= end && end <= bitmapSize);

The first ASSERT is redundant, and I would split the other ASSERT into two for better error messages.
Comment 4 Mark Lam 2020-05-26 15:16:57 PDT
Comment on attachment 400279 [details]
proposed patch.

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

>> Source/WTF/wtf/Bitmap.h:436
>> +    ASSERT(start <= end && end <= bitmapSize);
> 
> The first ASSERT is redundant, and I would split the other ASSERT into two for better error messages.

Will fix.
Comment 5 Mark Lam 2020-05-26 16:34:09 PDT
Thanks for the review.  Landed in r262167: <http://trac.webkit.org/r262167>.