[webkit-reviews] review granted: [Bug 204524] [iOS] Copy assertions before iterating over them in _notifyAssertionsOfImminentSuspension : [Attachment 384166] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 22 15:39:49 PST 2019


Alexey Proskuryakov <ap at webkit.org> has granted Chris Dumez
<cdumez at apple.com>'s request for review:
Bug 204524: [iOS] Copy assertions before iterating over them in
_notifyAssertionsOfImminentSuspension
https://bugs.webkit.org/show_bug.cgi?id=204524

Attachment 384166: Patch

https://bugs.webkit.org/attachment.cgi?id=384166&action=review




--- Comment #5 from Alexey Proskuryakov <ap at webkit.org> ---
Comment on attachment 384166
  --> https://bugs.webkit.org/attachment.cgi?id=384166
Patch

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

> Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:115
> +    Vector<WeakPtr<ProcessAndUIAssertion>> assertionsNeedingBackgroundTask =
WTF::map(_assertionsNeedingBackgroundTask, [](auto* assertion) {

Seems worth explaining in a comment why we don't expect anything to be added to
_assertionsNeedingBackgroundTask while iterating - or maybe even ASSERT at the
end that there isn't anything new.


More information about the webkit-reviews mailing list