Avoid iterating over all handles in MessagePumpMojo on every iteration to calculate deadlines.

Instead of iterating over every handle, only iterate over those that have
a deadline set (and hence can expire). This requires tracking which
handles have deadlines.

A better solution would be to use a priority queue to track the closest
deadline. However, it turns out that no-one currently uses deadlines here, so
the size of |deadline_handles_| will always be 0.

BUG=556865

Review URL: https://codereview.chromium.org/1448233002

Cr-Commit-Position: refs/heads/master@{#361291}


CrOS-Libchrome-Original-Commit: e8de0bc0f5403012fa125c1dc94e82744a270eb7
2 files changed
tree: ee533a1f38e4b511020c4348002cced6d8fef4b9
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/