DescriptionPrevent browser crashes when a site is added to shelf with extensions blacklisted.
The bookmark app installer underpinning the add to shelf functionality
assumes the validity of the extension pointer returned from the app
installation process with a DCHECK. However, CrxInstaller issues a
DONE notification with a null extension pointer attached when
installation fails, e.g. when extensions are blacklisted. Dereferencing
the null pointer leads to a whole browser crash that is 100%
reproducible whenever add to shelf is used while extensions are
blacklisted (and under any other conditions which cause extension
installation to fail).
This CL fixes the crash by explicitly checking the extension pointer
instead of DCHECKing it. When a null extension pointer is returned from
CrxInstaller, add to shelf will silently fail and the browser won't
crash. A future CL will stop the add to shelf functionality from being
exposed if extensions are disabled by policy.
BUG=545541
Committed: https://crrev.com/a5a950ab63b1e7abb7dbdb03a50fb090144cc262
Cr-Commit-Position: refs/heads/master@{#356231}
Patch Set 1 #
Dependent Patchsets: Messages
Total messages: 9 (4 generated)
|