| Index: Source/modules/accessibility/AXObjectCacheImpl.cpp
|
| diff --git a/Source/modules/accessibility/AXObjectCacheImpl.cpp b/Source/modules/accessibility/AXObjectCacheImpl.cpp
|
| index 33382b11bcac5d116acc81cdd9f7f6c38f972d72..6d561f68c297ab6011e98be5461288e708faf69d 100644
|
| --- a/Source/modules/accessibility/AXObjectCacheImpl.cpp
|
| +++ b/Source/modules/accessibility/AXObjectCacheImpl.cpp
|
| @@ -345,9 +345,16 @@ AXObject* AXObjectCacheImpl::getOrCreate(Widget* widget)
|
| return obj;
|
|
|
| RefPtr<AXObject> newObj = nullptr;
|
| - if (widget->isFrameView())
|
| + if (widget->isFrameView()) {
|
| + FrameView* frameView = toFrameView(widget);
|
| +
|
| + // Don't create an AXScrollView for a FrameView that isn't attached to a frame,
|
| + // for example if it's in the process of being disposed.
|
| + if (frameView->frame().view() != frameView || !frameView->layoutView())
|
| + return 0;
|
| +
|
| newObj = AXScrollView::create(toFrameView(widget), this);
|
| - else if (widget->isScrollbar())
|
| + } else if (widget->isScrollbar())
|
| newObj = AXScrollbar::create(toScrollbar(widget), this);
|
|
|
| // Will crash later if we have two objects for the same widget.
|
|
|