Commit fc9849ac authored by szager's avatar szager Committed by Commit bot

Speculative fix for crasher.

I speculate that WebAXObject::IsDetached() may not be as reliable
as Document::IsDetached().

Also, add a SECURITY_CHECK in the place where I suspect the bad
access is happening.

BUG=722801
R=dmazzoni@chromium.org,skobes@chromium.org

Review-Url: https://codereview.chromium.org/2892283002
Cr-Commit-Position: refs/heads/master@{#473448}
parent 252214d2
......@@ -15,7 +15,8 @@ namespace blink {
void ResizeViewportAnchor::ResizeFrameView(IntSize size) {
FrameView* frame_view = RootFrameView();
DCHECK(frame_view);
// TODO(szager): Remove this CHECK if it doesn't show up in crash reports.
CHECK(frame_view);
ScrollableArea* root_viewport = frame_view->GetScrollableArea();
ScrollOffset offset = root_viewport->GetScrollOffset();
......
......@@ -160,7 +160,9 @@ int WebAXObject::GenerateAXID() const {
bool WebAXObject::UpdateLayoutAndCheckValidity() {
if (!IsDetached()) {
Document* document = private_->GetDocument();
if (!document || !document->View())
// TODO(szager): Investigate whether/why document->IsDetached() can be
// true when this->IsDetached() is false.
if (!document || !document->View() || document->IsDetached())
return false;
document->View()->UpdateLifecycleToCompositingCleanPlusScrolling();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment