AccessibleNode shouldn't cache an Element's Document.
AccessibleNode needs an owner document. If it's constructed without an element, we get the document from the JavaScript context. That part is fine. But if we construct it from an Element, we were caching its Document - but elements can be reparented to a different document, leading to a crash if the Element is reparented and then its original document is deleted. The solution is to not cache the Document if the AccessibleNode is associated with an Element. Just get it from the Element. Bug: 785802 Change-Id: I8d67f9117a5d9a9c9efbd978ac4d1965e4c0eb2a Reviewed-on: https://chromium-review.googlesource.com/775616Reviewed-by:Alice Boxhall <aboxhall@chromium.org> Reviewed-by:
Mike West <mkwst@chromium.org> Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#518387}
Showing
Please register or sign in to comment