Fix NPE in GetNotifications after context shutdown. If the ExecutionContext has been shutdown, ScriptPromiseResolver returns a nullptr. This used to work in the GetNotifications call as we never used that value. However, in https://crrev.com/c/1475553 we introduced a TaskRunnerTimer and now call ExecutionContext::GetTaskRunner which causes a NPE if it has been shutdown already. This fix simply returns from NotificationManager::DidGetNotifications as any calls to ScriptPromiseResolver::Resolve or ::Reject would be ignored anyway. Bug: 983029 Change-Id: I87726eb04fa10b9cfef468ad31a50c0b0c97cb7f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1719004 Commit-Queue: Richard Knoll <knollr@chromium.org> Reviewed-by: Peter Beverloo <peter@chromium.org> Cr-Commit-Position: refs/heads/master@{#681230}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .