Commit 6bdf645d authored by nasko's avatar nasko Committed by Commit bot

TextAutosizer should handle frames without a FrameView.

During cross-process navigation, it is possible to create a LocalFrame
that doesn't have a FrameView, since the latter gets created at the time
a document commits. Since the commit in this case happens later in time,
the current code crashes as it expects the view to be there.

BUG=357747

Review URL: https://codereview.chromium.org/1374783005

Cr-Commit-Position: refs/heads/master@{#351204}
parent 427d4a56
...@@ -532,6 +532,9 @@ void TextAutosizer::updatePageInfo() ...@@ -532,6 +532,9 @@ void TextAutosizer::updatePageInfo()
return; return;
LocalFrame* mainFrame = m_document->page()->deprecatedLocalMainFrame(); LocalFrame* mainFrame = m_document->page()->deprecatedLocalMainFrame();
if (!mainFrame->view())
return;
IntSize frameSize = m_document->settings()->textAutosizingWindowSizeOverride(); IntSize frameSize = m_document->settings()->textAutosizingWindowSizeOverride();
if (frameSize.isEmpty()) if (frameSize.isEmpty())
frameSize = windowSize(); frameSize = windowSize();
......
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