Changeset 256470 in webkit


Ignore:
Timestamp:
Feb 12, 2020 1:46:36 PM (4 years ago)
Author:
youenn@apple.com
Message:

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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r256466 r256470  
     12020-02-12  Youenn Fablet  <youenn@apple.com>
     2
     3        ServiceWorkerContainer::jobResolvedWithRegistration scopeExit should capture all lambda parameters by value
     4        https://bugs.webkit.org/show_bug.cgi?id=207657
     5
     6        Reviewed by Chris Dumez.
     7
     8        shouldNotifyWhenResolved is captured by reference in the notifyIfExitEarly ScopeExit lambda.
     9        The ScopeExit is not always called synchronously so it is unsafe to capture values by reference here.
     10
     11        * workers/service/ServiceWorkerContainer.cpp:
     12        (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
     13
    1142020-02-12  Zalan Bujtas  <zalan@apple.com>
    215
  • trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp

    r256447 r256470  
    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.