Simplify ProcessThrottler implementation.
Created attachment 381833 [details] Patch
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?
(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.
Created attachment 381850 [details] Patch
<rdar://problem/56547883>
(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.
Comment on attachment 381850 [details] Patch Sure
Comment on attachment 381850 [details] Patch Clearing flags on attachment: 381850 Committed r251577: <https://trac.webkit.org/changeset/251577>
All reviewed patches have been landed. Closing bug.