Do not crash when removing focus from a frame with showModalDialog in its blur handler.
Do not crash when removing focus from a frame with showModalDialog in its blur handler.

The code was:
    if (!m_focusedFrame)
        setFocusedFrame(m_page->mainFrame());
    if (m_focusedFrame->view()) {

It looks m_focusedFrame at the last line is not NULL. However
setFocusedFrame is not a simple setter, and it rejects to update
m_focusedFrame in a case of reentrance, and it dispatches events.
So, m_focusedFrame can be NULL.

This CL has no tests. It seems there are no ways to call
FocusController::setFocused correctly in content_shell's DRT mode.

BUG=343809
TEST=Open the testcase in the bug, then press Tab key.

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

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@167495 bbb929c8-8fbe-4397-9dbb-9b2b20218538

primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs