[IndexedDB] Fixed stack overflow in lock releasing

When a large chain of locks are all released at once, the previous
release path would create new stack frames per lock release, allowing a
stack overflow to occur.

This patch updates the lock aquisition code to detect early on if a
lock request has been cancelled, and move on to the next lock in the
same stack frame, avoiding the stack overflow.

R=pwnall@chromium.org

Bug: 959743
Change-Id: I73ac813100b67aa83dfdf54faa04b72359042abb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1597253
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657022}
3 files changed