Bug 212386 - Enhance Bitmap::setEachNthBit() to also take an end index.
Summary: Enhance Bitmap::setEachNthBit() to also take an end index.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-26 14:51 PDT by Mark Lam
Modified: 2020-05-26 16:34 PDT (History)
6 users (show)

See Also:


Attachments
proposed patch. (6.66 KB, patch)
2020-05-26 14:57 PDT, Mark Lam
rmorisset: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>.