Fix optimized erasing from the beginning of a circular_deque.

Previously the boundary check was incorrect when detecting items
were being deleted from the front of a circular_deque. This caused
it to fall through to the slow case where all items were shifted
over, breaking the promise of amoritized O(1) time.

Since this is an optimization (the existing code was correct, just
slower than necessary), there are no unit tests for this.

Bug: 769812
Change-Id: I8d78be8185741baaca5f2e36413f615102fd68db
Reviewed-on: https://chromium-review.googlesource.com/690976
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505205}

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