Nothing to do if state isn't changing
In the test case in 835713, the page calls context.resume() twice. Once on load and once on a user gesture. The first call to resume has a promise pending that gets resolved when the second promise is resolved when the context is finally allowed to start. As part of the resolution of the promise, the context state is set to "running", which happens in the first promise. The second promise does this again. But SetContextState checks for valid state transitions, and running->running isn't one of them. However, if the state isn't changing, there's nothing that needs to be done, so SetContextStae can return early. Bug: 835713 Test: repro case no longer DCHECKs Change-Id: Iccfc88ce1caedc3cdf7cdfcf3e8ed4a84d4010e4 Reviewed-on: https://chromium-review.googlesource.com/1026082Reviewed-by:Hongchan Choi <hongchan@chromium.org> Commit-Queue: Raymond Toy <rtoy@chromium.org> Cr-Commit-Position: refs/heads/master@{#553591}
Showing
Please register or sign in to comment