Fix AppMenuPropertiesDelegateImpl NPE on BookmarkBridge
A previous CL refactorted AppMenuPropertiesDelegateImpl to use an ObservableSupplier for obtaining the BookmarkBridge rather than a setter in the AppMenuPropertiesDelegate interface. When a callback is registered with the ObservableSupplier, a call to the callback is posted if the supplied object is already available. This changed the timing of when the BookmarkBridge is supplied, allowing the app menu to be opened before the BookmarkBridge is supplied. This CL attempts to get the BookmarkBridge from the supplier directly when #updateBookmarkMenuItem is called if the BookmarkBridge is null and adds another null check in case the bridge is still not available. BUG=1027222 Change-Id: I8d8bbeb812286c8c18baf0ae65da11bd48386d04 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1934448Reviewed-by:Matthew Jones <mdjones@chromium.org> Commit-Queue: Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#718696}
Showing
Please register or sign in to comment