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}
1 file changed