Allow throwing an exception in fulfilled function in WaitUntilObserver
Previously, when an exception happens in an internal callback to fulfill a promise passed to waitUntil or respondWith, it invokes rejected callback too, though we expect that either of those is called. This CL correct it by using ScriptPromise::Then() twice. Previously, we used ScriptPromise::Then() as like Then(f, g), and it means calling a promise.then(f).catch(g); in the JavaScript world. I changed it to Then(f, _), Then(_, g), which is equivalent to promise.then(f); promise.catch(g);. Bug: 889567 Change-Id: Id2e2848762b50df633293571c01c5f60d106de7c Reviewed-on: https://chromium-review.googlesource.com/c/1312141Reviewed-by:Matt Falkenhagen <falken@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#604535}
Showing
Please register or sign in to comment