Changeset 256447 in webkit


Ignore:
Timestamp:
Feb 12, 2020 10:24:16 AM (4 years ago)
Author:
Chris Dumez
Message:

RELEASE_ASSERT() under WebSWClientConnection::didResolveRegistrationPromise()
https://bugs.webkit.org/show_bug.cgi?id=207637
<rdar://problem/59093490>

Reviewed by Youenn Fablet.

We were capturing data by reference in the notifyIfExitEarly ScopeExit lambda and then capturing it
in the task posted to the event loop, which was unsafe.

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r256442 r256447  
     12020-02-12  Chris Dumez  <cdumez@apple.com>
     2
     3        RELEASE_ASSERT() under WebSWClientConnection::didResolveRegistrationPromise()
     4        https://bugs.webkit.org/show_bug.cgi?id=207637
     5        <rdar://problem/59093490>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        We were capturing data by reference in the notifyIfExitEarly ScopeExit lambda and then capturing it
     10        in the task posted to the event loop, which was unsafe.
     11
     12        * workers/service/ServiceWorkerContainer.cpp:
     13        (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
     14
    1152020-02-12  Andres Gonzalez  <andresg_22@apple.com>
    216
  • trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp

    r253667 r256447  
    384384    });
    385385
    386     auto notifyIfExitEarly = WTF::makeScopeExit([this, protectedThis = makeRef(*this), &data, &shouldNotifyWhenResolved] {
     386    auto notifyIfExitEarly = WTF::makeScopeExit([this, protectedThis = makeRef(*this), key = data.key, &shouldNotifyWhenResolved] {
    387387        if (shouldNotifyWhenResolved == ShouldNotifyWhenResolved::Yes)
    388             notifyRegistrationIsSettled(data.key);
     388            notifyRegistrationIsSettled(key);
    389389    });
    390390
Note: See TracChangeset for help on using the changeset viewer.