Changeset 63707 in webkit


Ignore:
Timestamp:
Jul 19, 2010 7:37:01 PM (14 years ago)
Author:
tonyg@chromium.org
Message:

2010-07-19 Tony Gentilcore <tonyg@chromium.org>

Reviewed by Dimitri Glazkov.

Only set unloadEventEnd when the unload event is actually fired
https://bugs.webkit.org/show_bug.cgi?id=42607

r63689 introduced this ASSERT and it began failing on Qt and Mac debug.
For some reason, it did not fail on Windows (which is where I was
testing). The ASSERT was disabled in r63699.

Test: page-cache related layout tests don't crash in debug mode on Mac.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63706 r63707  
     12010-07-19  Tony Gentilcore  <tonyg@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Only set unloadEventEnd when the unload event is actually fired
     6        https://bugs.webkit.org/show_bug.cgi?id=42607
     7
     8        r63689 introduced this ASSERT and it began failing on Qt and Mac debug.
     9        For some reason, it did not fail on Windows (which is where I was
     10        testing). The ASSERT was disabled in r63699.
     11
     12        Test: page-cache related layout tests don't crash in debug mode on Mac.
     13
     14        * loader/FrameLoader.cpp:
     15        (WebCore::FrameLoader::stopLoading):
     16
    1172010-07-19  Andreas Kling  <andreas.kling@nokia.com>
    218
  • trunk/WebCore/loader/FrameLoader.cpp

    r63699 r63707  
    448448                    if (unloadEventPolicy == UnloadEventPolicyUnloadAndPageHide)
    449449                        m_frame->domWindow()->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, m_frame->document()->inPageCache()), m_frame->document());
    450                     if (!m_frame->document()->inPageCache())
     450                    if (!m_frame->document()->inPageCache()) {
    451451                        m_frame->domWindow()->dispatchEvent(Event::create(eventNames().unloadEvent, false, false), m_frame->domWindow()->document());
    452                     if (m_provisionalDocumentLoader) {
    453                         DocumentLoadTiming* timing = m_provisionalDocumentLoader->timing();
    454                         ASSERT(timing->navigationStart);
    455                         // FIXME: This fails. Understand why.
    456                         // ASSERT(!timing->unloadEventEnd);
    457                         timing->unloadEventEnd = currentTime();
    458                         ASSERT(timing->unloadEventEnd >= timing->navigationStart);
     452
     453                        if (m_provisionalDocumentLoader) {
     454                            DocumentLoadTiming* timing = m_provisionalDocumentLoader->timing();
     455                            ASSERT(timing->navigationStart);
     456                            ASSERT(!timing->unloadEventEnd);
     457                            timing->unloadEventEnd = currentTime();
     458                            ASSERT(timing->unloadEventEnd >= timing->navigationStart);
     459                        }
    459460                    }
    460461                }
Note: See TracChangeset for help on using the changeset viewer.