Skip to content

Commit

Permalink
Avoid a superfluous call to ProcessEvents in MessagePumpKqueue
Browse files Browse the repository at this point in the history
Change-Id: I0031a90c2bd4ae21c42fe7e38a411186b270e6b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2822898
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: Olivier Li <olivierli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#872449}
  • Loading branch information
OlivierLi authored and Chromium LUCI CQ committed Apr 14, 2021
1 parent 3de0bc8 commit 6203f0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base/message_loop/message_pump_kqueue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,11 @@ bool MessagePumpKqueue::DoInternalWork(Delegate* delegate,
events_.size(), flags, nullptr));

PCHECK(rv >= 0) << "kevent64";
if (rv == 0) {
// No events to dispatch so no need to call ProcessEvents().
return false;
}

return ProcessEvents(delegate, rv);
}

Expand Down

0 comments on commit 6203f0a

Please sign in to comment.