Bug 231728 - Remove std::iterator usage
Summary: Remove std::iterator usage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-14 02:24 PDT by Yusuke Suzuki
Modified: 2021-10-14 10:09 PDT (History)
12 users (show)

See Also:


Attachments
Patch (15.30 KB, patch)
2021-10-14 02:27 PDT, Yusuke Suzuki
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (16.82 KB, patch)
2021-10-14 02:38 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2021-10-14 02:24:14 PDT
[WTF] Remove std::iterator usage
Comment 1 Yusuke Suzuki 2021-10-14 02:27:47 PDT
Created attachment 441195 [details]
Patch
Comment 2 Yusuke Suzuki 2021-10-14 02:38:06 PDT
Created attachment 441196 [details]
Patch
Comment 3 Keith Miller 2021-10-14 06:26:40 PDT
Comment on attachment 441196 [details]
Patch

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

> Source/WebCore/platform/Timer.cpp:336
> +    std::push_heap(TimerHeapIterator(heapData), TimerHeapIterator(heapData + m_heapItem->heapIndex() + 1), TimerHeapLessThanFunction());

What's the deal here? I don't see where we're `using std::push_heap` anywhere. Is that in a different file?
Comment 4 Darin Adler 2021-10-14 09:04:46 PDT
Comment on attachment 441196 [details]
Patch

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

>> Source/WebCore/platform/Timer.cpp:336
>> +    std::push_heap(TimerHeapIterator(heapData), TimerHeapIterator(heapData + m_heapItem->heapIndex() + 1), TimerHeapLessThanFunction());
> 
> What's the deal here? I don't see where we're `using std::push_heap` anywhere. Is that in a different file?

Presumably, because there was a type from namespace std involved, we didn’t have to write std::push_heap because of argument-dependent lookup <https://en.cppreference.com/w/cpp/language/adl>. Now the types have changed, and so we have to explicitly specify std.
Comment 5 EWS 2021-10-14 09:39:45 PDT
Committed r284167 (242987@main): <https://commits.webkit.org/242987@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 441196 [details].
Comment 6 Radar WebKit Bug Importer 2021-10-14 09:40:19 PDT
<rdar://problem/84259492>
Comment 7 Yusuke Suzuki 2021-10-14 10:09:35 PDT
Yup. That change was necessary because of ADL.