Don't wait to notify client of spoof attempt if a modal dialog is created.

BUG=281256
TEST=See bug for repro steps.

Review URL: https://chromiumcodereview.appspot.com/23620020

git-svn-id: svn://svn.chromium.org/blink/trunk@157196 bbb929c8-8fbe-4397-9dbb-9b2b20218538
void FrameLoader::stopLoading()
{
    m_isComplete = true; // to avoid calling completed() in finishedParsing()

    if (m_frame->document() && m_frame->document()->parsing()) {
        finishedParsing();
        m_frame->document()->setParsing(false);
    }

    if (Document* doc = m_frame->document()) {
        doc->setReadyState(Document::Complete);

        DatabaseManager::manager().stopDatabases(doc, 0);
    }

    m_frame->navigationScheduler()->cancel();
}

void FrameLoader::stopLoading()
{
    m_isComplete = true; // to avoid calling completed() in finishedParsing()

    if (m_frame->document() && m_frame->document()->parsing()) {
        finishedParsing();
        m_frame->document()->setParsing(false);
    }

    if (Document* doc = m_frame->document()) {
        doc->setReadyState(Document::Complete);

        DatabaseManager::manager().stopDatabases(doc, 0);
    }

    m_frame->navigationScheduler()->cancel();
}
