Changeset 269997 in webkit


Ignore:
Timestamp:
Nov 18, 2020 3:38:14 PM (3 years ago)
Author:
Chris Dumez
Message:

REGRESSION (r269227?): Flaky crash in WebCore::DOMPromiseProxy seen with imported/w3c/web-platform-tests/service-workers/service-worker/referrer-toplevel-script-fetch.https.html
https://bugs.webkit.org/show_bug.cgi?id=219009
<rdar://problem/71464073>

Reviewed by Geoffrey Garen.

The lambda in ServiceWorkerContainer::ready() was dereferencing m_readyPromise unconditionally.
This is not correct and we need a null-check since ServiceWorkerContainer::stop() nulls out
m_readyPromise.

No new tests, already covered by existing test that is flakily crashing.

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::ready):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r269989 r269997  
     12020-11-18  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION (r269227?): Flaky crash in WebCore::DOMPromiseProxy seen with imported/w3c/web-platform-tests/service-workers/service-worker/referrer-toplevel-script-fetch.https.html
     4        https://bugs.webkit.org/show_bug.cgi?id=219009
     5        <rdar://problem/71464073>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        The lambda in ServiceWorkerContainer::ready() was dereferencing m_readyPromise unconditionally.
     10        This is not correct and we need a null-check since ServiceWorkerContainer::stop() nulls out
     11        m_readyPromise.
     12
     13        No new tests, already covered by existing test that is flakily crashing.
     14
     15        * workers/service/ServiceWorkerContainer.cpp:
     16        (WebCore::ServiceWorkerContainer::ready):
     17
    1182020-11-18  Zalan Bujtas  <zalan@apple.com>
    219
  • trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp

    r269281 r269997  
    111111            queueTaskKeepingObjectAlive(*this, TaskSource::DOMManipulation, [this, registrationData = WTFMove(registrationData)]() mutable {
    112112                auto* context = scriptExecutionContext();
    113                 if (!context)
     113                if (!context || !m_readyPromise)
    114114                    return;
    115115                auto registration = ServiceWorkerRegistration::getOrCreate(*context, *this, WTFMove(registrationData));
Note: See TracChangeset for help on using the changeset viewer.