RESOLVED FIXED 203370
Simplify ProcessThrottler implementation
https://bugs.webkit.org/show_bug.cgi?id=203370
Summary Simplify ProcessThrottler implementation
Chris Dumez
Reported 2019-10-24 10:00:05 PDT
Simplify ProcessThrottler implementation.
Attachments
Patch (37.98 KB, patch)
2019-10-24 12:38 PDT, Chris Dumez
no flags
Patch (37.95 KB, patch)
2019-10-24 15:46 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2019-10-24 12:38:04 PDT
Alex Christensen
Comment 2 2019-10-24 13:26:48 PDT
Comment on attachment 381833 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=381833&action=review > Source/WebKit/ChangeLog:13 > + - Wether the suspension is imminent or not, the child process now always responds with Whether > Source/WebKit/NetworkProcess/NetworkProcess.cpp:2087 > +void NetworkProcess::prepareToSuspend(uint64_t requestToSuspendID, bool isSuspensionImminent) Could this be made a typed identifier? Since it's only used for a reply, could you use sendWithAsyncReply instead?
Chris Dumez
Comment 3 2019-10-24 13:53:35 PDT
(In reply to Alex Christensen from comment #2) > Comment on attachment 381833 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=381833&action=review > > > Source/WebKit/ChangeLog:13 > > + - Wether the suspension is imminent or not, the child process now always responds with > > Whether > > > Source/WebKit/NetworkProcess/NetworkProcess.cpp:2087 > > +void NetworkProcess::prepareToSuspend(uint64_t requestToSuspendID, bool isSuspensionImminent) > > Could this be made a typed identifier? Since it's only used for a reply, > could you use sendWithAsyncReply instead? Since the ProcessThrottler needs to know if the response is for the *last* request to suspend, I think the ProcessThrottler will still need an identifier, even if I use sendWithAsyncReply() for the IPC. Using sendWithAsyncReply() for the IPC is likely feasible, I will try it out to see how it look.
Chris Dumez
Comment 4 2019-10-24 15:46:40 PDT
Chris Dumez
Comment 5 2019-10-24 17:00:40 PDT
Chris Dumez
Comment 6 2019-10-24 17:03:02 PDT
(In reply to Chris Dumez from comment #3) > (In reply to Alex Christensen from comment #2) > > Comment on attachment 381833 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=381833&action=review > > > > > Source/WebKit/ChangeLog:13 > > > + - Wether the suspension is imminent or not, the child process now always responds with > > > > Whether > > > > > Source/WebKit/NetworkProcess/NetworkProcess.cpp:2087 > > > +void NetworkProcess::prepareToSuspend(uint64_t requestToSuspendID, bool isSuspensionImminent) > > > > Could this be made a typed identifier? Since it's only used for a reply, > > could you use sendWithAsyncReply instead? > > Since the ProcessThrottler needs to know if the response is for the *last* > request to suspend, I think the ProcessThrottler will still need an > identifier, even if I use sendWithAsyncReply() for the IPC. > Using sendWithAsyncReply() for the IPC is likely feasible, I will try it out > to see how it look. If you don't mind, I'd like to do this refactoring in a follow-up.
Alex Christensen
Comment 7 2019-10-24 17:31:20 PDT
Comment on attachment 381850 [details] Patch Sure
Chris Dumez
Comment 8 2019-10-24 18:07:13 PDT
Comment on attachment 381850 [details] Patch Clearing flags on attachment: 381850 Committed r251577: <https://trac.webkit.org/changeset/251577>
Chris Dumez
Comment 9 2019-10-24 18:07:15 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.