⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245056 in webkit


Ignore:
Timestamp:
May 8, 2019, 9:01:39 AM (7 years ago)
Author:
Brent Fulgham
Message:

Correct delayed load event handling
https://bugs.webkit.org/show_bug.cgi?id=197679
<rdar://problem/50423334>

Reviewed by Alex Christensen.

We need to properly account for the fact that JavaScript might run
while performing loads.

  • dom/Document.cpp:

(WebCore::Document::loadEventDelayTimerFired):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r245054 r245056  
     12019-05-08  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Correct delayed load event handling
     4        https://bugs.webkit.org/show_bug.cgi?id=197679
     5        <rdar://problem/50423334>
     6
     7        Reviewed by Alex Christensen.
     8
     9        We need to properly account for the fact that JavaScript might run
     10        while performing loads.
     11
     12        * dom/Document.cpp:
     13        (WebCore::Document::loadEventDelayTimerFired):
     14
    1152019-05-08  Philippe Normand  <pnormand@igalia.com>
    216
  • trunk/Source/WebCore/dom/Document.cpp

    r245025 r245056  
    63016301    // FIXME: Not obvious why checkCompleted needs to go first. The order these are called is
    63026302    // visible to WebKit clients, but it's more like a race than a well-defined relationship.
     6303    auto weakThis = makeWeakPtr(this);
    63036304    checkCompleted();
    6304     if (auto* frame = this->frame())
    6305         frame->loader().checkLoadComplete();
     6305    if (weakThis) {
     6306        if (auto* frame = this->frame())
     6307            frame->loader().checkLoadComplete();
     6308    }
    63066309}
    63076310
Note: See TracChangeset for help on using the changeset viewer.