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

Changeset 245142 in webkit


Ignore:
Timestamp:
May 9, 2019, 10:14:06 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

    r245126 r245142  
     12019-05-09  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-09  Antti Koivisto  <antti@apple.com>
    216
  • trunk/Source/WebCore/dom/Document.cpp

    r245056 r245142  
    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);
     6303    Ref<Document> protectedThis(*this);
    63046304    checkCompleted();
    6305     if (weakThis) {
    6306         if (auto* frame = this->frame())
    6307             frame->loader().checkLoadComplete();
    6308     }
     6305    if (auto* frame = this->frame())
     6306        frame->loader().checkLoadComplete();
    63096307}
    63106308
Note: See TracChangeset for help on using the changeset viewer.