Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Issue 1820473003: Only the root BrowserAccessibilityManager should destroy the java obj. (Closed)

Created:
4 years, 9 months ago by dmazzoni
Modified:
4 years, 9 months ago
Reviewers:
David Tseng
CC:
chromium-reviews, aboxhall+watch_chromium.org, nektar+watch_chromium.org, jam, yuzo+watch_chromium.org, je_julie, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@fix_create_bam
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Only 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -2 lines) Patch
M content/browser/accessibility/browser_accessibility_manager_android.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java View 7 chunks +21 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 8 (3 generated)
dmazzoni
4 years, 9 months ago (2016-03-18 21:43:31 UTC) #2
David Tseng
lgtm
4 years, 9 months ago (2016-03-18 23:31:29 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1820473003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1820473003/1
4 years, 9 months ago (2016-03-18 23:49:33 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 9 months ago (2016-03-19 00:36:12 UTC) #6
commit-bot: I haz the power
4 years, 9 months ago (2016-03-19 00:37:15 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/83b8b4b78472c6b67319367393b8b865efdc8c47
Cr-Commit-Position: refs/heads/master@{#382145}

Powered by Google App Engine
This is Rietveld 408576698