DescriptionOnly the root BrowserAccessibilityManager should destroy the java obj.
Ever since http://crrev.com/380416 we have multiple accessibility trees
in C++, one for each frame - but we only have one Java
BrowserAccessibilityManager object.
We were incorrectly calling onNativeObjectDestroyed when any accessibility
tree was destroyed, instead of only when the root tree was destroyed.
That gave the Java obj a null mNativeObj and led to crashes.
This change fixes this by having onNativeObjectDestroyed take an argument
so that the right pointer is the one that's cleared - only the one on the
root frame. It also adds checks to all of the Java functions called
by native code so that mNativeObj being null can't lead to a crash again.
BUG=595426
Committed: https://crrev.com/83b8b4b78472c6b67319367393b8b865efdc8c47
Cr-Commit-Position: refs/heads/master@{#382145}
Patch Set 1 #
Depends on Patchset: Messages
Total messages: 8 (3 generated)
|