Title: [256677] branches/safari-609-branch/Source/WebCore
Revision
256677
Author
repst...@apple.com
Date
2020-02-14 19:01:52 -0800 (Fri, 14 Feb 2020)

Log 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

Modified Paths

Diff

Modified: branches/safari-609-branch/Source/WebCore/ChangeLog (256676 => 256677)


--- branches/safari-609-branch/Source/WebCore/ChangeLog	2020-02-15 03:01:49 UTC (rev 256676)
+++ branches/safari-609-branch/Source/WebCore/ChangeLog	2020-02-15 03:01:52 UTC (rev 256677)
@@ -1,5 +1,36 @@
 2020-02-14  Russell Epstein  <repst...@apple.com>
 
+        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
+
+    2020-02-12  Youenn Fablet  <you...@apple.com>
+
+            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):
+
+2020-02-14  Russell Epstein  <repst...@apple.com>
+
         Cherry-pick r256447. rdar://problem/59446998
 
     RELEASE_ASSERT() under WebSWClientConnection::didResolveRegistrationPromise()

Modified: branches/safari-609-branch/Source/WebCore/workers/service/ServiceWorkerContainer.cpp (256676 => 256677)


--- branches/safari-609-branch/Source/WebCore/workers/service/ServiceWorkerContainer.cpp	2020-02-15 03:01:49 UTC (rev 256676)
+++ branches/safari-609-branch/Source/WebCore/workers/service/ServiceWorkerContainer.cpp	2020-02-15 03:01:52 UTC (rev 256677)
@@ -383,7 +383,7 @@
         destroyJob(job);
     });
 
-    auto notifyIfExitEarly = WTF::makeScopeExit([this, protectedThis = makeRef(*this), key = data.key, &shouldNotifyWhenResolved] {
+    auto notifyIfExitEarly = WTF::makeScopeExit([this, protectedThis = makeRef(*this), key = data.key, shouldNotifyWhenResolved] {
         if (shouldNotifyWhenResolved == ShouldNotifyWhenResolved::Yes)
             notifyRegistrationIsSettled(key);
     });
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to