Handle invalid contexts in CredentialManager callbacks better.
As of crrev.com/c/536543, it's an error to call ExecutionContext::From() on an invalid |context|. Update guards in request/notification callbacks in blink::CredentialsContainer to instead rely on ScriptPromiseResolver being a ContextLifecycleObserver, which is able to safely return the Frame (i.e. browsing context) associated with its ExecutionContext (here always a document) if it is still active, and a nullptr otherwise. This CL also removes a useless copy of |web_credentials|. Bug: 794278 Change-Id: Iefe3557dbc374a81964be7f5f51a9f8b73e93e51 Reviewed-on: https://chromium-review.googlesource.com/824267 Commit-Queue: Balazs Engedy <engedy@chromium.org> Reviewed-by:Yuki Shiino <yukishiino@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#524368}
Showing
Please register or sign in to comment