[webkit-reviews] review granted: [Bug 174270] NetworkProcess should close listening WebRTC sockets when being suspended : [Attachment 315034] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 10 23:27:58 PDT 2017


Chris Dumez <cdumez at apple.com> has granted youenn fablet <youennf at gmail.com>'s
request for review:
Bug 174270: NetworkProcess should close listening WebRTC sockets when being
suspended
https://bugs.webkit.org/show_bug.cgi?id=174270

Attachment 315034: Patch

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




--- Comment #34 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 315034
  --> https://bugs.webkit.org/attachment.cgi?id=315034
Patch

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

>>>> Source/WebKit2/NetworkProcess/NetworkProcess.cpp:643
>>>> +// FIXME: We can remove this one by adapting RefCounter.
>>> 
>>> I think we should do this. Why introduce a new class if there is a direct
replacement? As far as I can tell, this is a trivial change, no? If so, why add
a FIXME comment instead of doing it right?
>> 
>> We need the counter value of RefCounter to trigger the IPC call when it is
decremented to zero.
>> This counter value is not passed to the lambda right now by RefCounter.
> 
> You can get the counter value via RefCounter::value().

For the record, I preferred the previous version that had the IPC in its
destructor. There is no point in making this generic and it is unlikely to be
reused considering it is in a cpp file.
I preferred the previous iteration because it resulted in simpler code below.


More information about the webkit-reviews mailing list