diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-10-05 16:21:33 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-11-07 09:39:28 +0000 |
commit | 2190ec5a1500a0b2fd39cdefb3b6db23b97eaa8a (patch) | |
tree | 7132a622c260ad7f17ff7047423310528798fe43 | |
parent | c21a3696115a56df3717097e4db6556da43703aa (diff) | |
download | qtwebengine-chromium-45-based.tar.gz |
Fix accessibility crash on view destruction, when a popup is open45-based
Scenario: have a QWebEngineView with a popup open. Close the
application window, while leaving the popup open.
When the QWebEngineView is destroyed, focus is removed from its
underlying QWindow, and on macOS this leads to an accessibility
notification to the still-alive RenderWidgetHostViewQt which was
created for the popup.
This notification is piped to Chromium, which essentially notifies
all WebContentsImpls to set the new accessibility mode.
Finally this leads to dereferencing a null pointer of the main view's
RenderFrameHostImpl object which was already destroyed.
Ideally, by this point, the popup RenderWidgetHostViewQt should not
exist, but because it is not parented to the main window RWHVQ, but
rather is destroyed sometime later after the main one, this fix is the
next best thing.
Change-Id: Iefdc1d25a5f311fa362da9f4c4cf0feef23d284b
Task-number: QTBUG-56386
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/content/browser/web_contents/web_contents_impl.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chromium/content/browser/web_contents/web_contents_impl.cc b/chromium/content/browser/web_contents/web_contents_impl.cc index 331e8794e2d..2ea2ab94b98 100644 --- a/chromium/content/browser/web_contents/web_contents_impl.cc +++ b/chromium/content/browser/web_contents/web_contents_impl.cc @@ -767,7 +767,7 @@ SkColor WebContentsImpl::GetThemeColor() const { } void WebContentsImpl::SetAccessibilityMode(AccessibilityMode mode) { - if (mode == accessibility_mode_) + if (mode == accessibility_mode_ || is_being_destroyed_) return; accessibility_mode_ = mode; |