[Chromecast] Handle null in WebContentsRegistry.getWebContents.
If a session ID is not in the map, we propagate the null value to the caller, which already handles null WebContents. Bug: b/158602213 Test: cast_shell_junit_tests Change-Id: Ib8d4d6fcaea7cf7a3df833199a379afe342b3aee Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238516 Reviewed-by: Simeon Anfinrud <sanfin@chromium.org> Commit-Queue: Thoren Paulson <thoren@chromium.org> Cr-Commit-Position: refs/heads/master@{#777515}
This commit is contained in:

committed by
Commit Bot

parent
b461ba8c07
commit
d97168f56e
@ -39,7 +39,8 @@ public class WebContentsRegistry {
|
||||
}
|
||||
|
||||
public static WebContents getWebContents(String sessionId) {
|
||||
return sSesionIdToWebContents.get(sessionId).webContents;
|
||||
WebContentsHolder result = sSesionIdToWebContents.get(sessionId);
|
||||
return result == null ? null : result.webContents;
|
||||
}
|
||||
|
||||
public static void initializeWebContents(
|
||||
|
Reference in New Issue
Block a user