REGRESSION (r226622): ASSERTION FAILED: !m_frame in WebCore::DOMWindowProperty::willD...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jan 2018 23:14:15 +0000 (23:14 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jan 2018 23:14:15 +0000 (23:14 +0000)
commite833fb083d735ac1a26424afa305d7bbf8eb4dba
tree6c7a31b91854a0d89989d9197b1e3dee2e86c36e
parentc4d10e42b286e96954b033d677184c335a5e9046
REGRESSION (r226622): ASSERTION FAILED: !m_frame in WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame()
https://bugs.webkit.org/show_bug.cgi?id=181756

Patch by Ali Juma <ajuma@chromium.org> on 2018-01-23
Reviewed by Simon Fraser.

Don't create a VisualViewport for a suspended DOMWindow. When a DOMWindow is suspended
for document suspension, all DOMWindowProperties are disconnected from their frame.
Creating a new VisualViewport while in this state means unexpectedly having a DOMWindowProperty
that's connected to a frame, and this leads to an assertion failure.

Test: http/tests/navigation/https-in-page-cache.html

* page/DOMWindow.cpp:
(WebCore::DOMWindow::visualViewport const):
Don't create a VisualViewport while suspended.
* page/FrameView.cpp:
(WebCore::FrameView::updateLayoutViewport):
Handle null DOMWindow::visualViewport.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/FrameView.cpp