Changeset 256677 in webkit


Ignore:
Timestamp:
Feb 14, 2020 7:01:52 PM (4 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r256470. rdar://problem/59446998

ServiceWorkerContainer::jobResolvedWithRegistration scopeExit should capture all lambda parameters by value
https://bugs.webkit.org/show_bug.cgi?id=207657

Reviewed by Chris Dumez.

shouldNotifyWhenResolved is captured by reference in the notifyIfExitEarly ScopeExit lambda.
The ScopeExit is not always called synchronously so it is unsafe to capture values by reference here.

  • workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256470 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-609-branch/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-609-branch/Source/WebCore/ChangeLog

    r256675 r256677  
     12020-02-14  Russell Epstein  <repstein@apple.com>
     2
     3        Cherry-pick r256470. rdar://problem/59446998
     4
     5    ServiceWorkerContainer::jobResolvedWithRegistration scopeExit should capture all lambda parameters by value
     6    https://bugs.webkit.org/show_bug.cgi?id=207657
     7   
     8    Reviewed by Chris Dumez.
     9   
     10    shouldNotifyWhenResolved is captured by reference in the notifyIfExitEarly ScopeExit lambda.
     11    The ScopeExit is not always called synchronously so it is unsafe to capture values by reference here.
     12   
     13    * workers/service/ServiceWorkerContainer.cpp:
     14    (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
     15   
     16   
     17    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     18
     19    2020-02-12  Youenn Fablet  <youenn@apple.com>
     20
     21            ServiceWorkerContainer::jobResolvedWithRegistration scopeExit should capture all lambda parameters by value
     22            https://bugs.webkit.org/show_bug.cgi?id=207657
     23
     24            Reviewed by Chris Dumez.
     25
     26            shouldNotifyWhenResolved is captured by reference in the notifyIfExitEarly ScopeExit lambda.
     27            The ScopeExit is not always called synchronously so it is unsafe to capture values by reference here.
     28
     29            * workers/service/ServiceWorkerContainer.cpp:
     30            (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
     31
    1322020-02-14  Russell Epstein  <repstein@apple.com>
    233
  • branches/safari-609-branch/Source/WebCore/workers/service/ServiceWorkerContainer.cpp

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