PageInfo: prevent the crashes of instantiating with non-tab webContents
If PageInfo is instantiated with a webContents that is not from a tab, a crash would happen. This CL is to allow for such a webContents in this case. How would it crash? The webContents not coming from a tab does not have TabSpecificContentSettings attached to it. If PageInfo is initiated with this webContents, PageInfo tries to use TabSpecificContentSettings and causes a null pointer exception. The general idea of this CL is that, for each PageInfo instantiation, create TabSpecificContentSettings for WebContents who does not have it. This CL belongs to a larger change of extending the usage of PageInfo dialog to the webContents of PaymentHandler UI. Bug: 999196 Change-Id: Ifdcf15e61193d93f9a669d93111507b32dc91b0d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1944627 Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Reviewed-by:Balazs Engedy <engedy@chromium.org> Reviewed-by:
Yaron Friedman <yfriedman@chromium.org> Reviewed-by:
Rouslan Solomakhin <rouslan@chromium.org> Cr-Commit-Position: refs/heads/master@{#721801}
Showing
Please register or sign in to comment