Title: [228956] branches/safari-605-branch/Source/WebCore
Revision
228956
Author
jmarc...@apple.com
Date
2018-02-23 12:30:01 -0800 (Fri, 23 Feb 2018)

Log Message

Cherry-pick r228928. rdar://problem/37816673

Modified Paths

Diff

Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (228955 => 228956)


--- branches/safari-605-branch/Source/WebCore/ChangeLog	2018-02-23 20:02:02 UTC (rev 228955)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog	2018-02-23 20:30:01 UTC (rev 228956)
@@ -1,3 +1,21 @@
+2018-02-23  Jason Marcell  <jmarc...@apple.com>
+
+        Cherry-pick r228928. rdar://problem/37816673
+
+    2018-02-22  Chris Dumez  <cdu...@apple.com>
+
+            ServiceWorkerContainer::scheduleJob() fails to isolate copy the jobData before passing it to the main thread
+            https://bugs.webkit.org/show_bug.cgi?id=183046
+            <rdar://problem/37793395>
+
+            Reviewed by Youenn Fablet.
+
+            Make sure we isolate copy the jobData before passing it to the main thread in ServiceWorkerContainer::scheduleJob().
+            The jobData contains Strings / URLs so it is not safe to have non-isolated copies of it on various threads.
+
+            * workers/service/ServiceWorkerContainer.cpp:
+            (WebCore::ServiceWorkerContainer::scheduleJob):
+
 2018-02-21  Jason Marcell  <jmarc...@apple.com>
 
         Cherry-pick r228895. rdar://problem/37767705

Modified: branches/safari-605-branch/Source/WebCore/workers/service/ServiceWorkerContainer.cpp (228955 => 228956)


--- branches/safari-605-branch/Source/WebCore/workers/service/ServiceWorkerContainer.cpp	2018-02-23 20:02:02 UTC (rev 228955)
+++ branches/safari-605-branch/Source/WebCore/workers/service/ServiceWorkerContainer.cpp	2018-02-23 20:30:01 UTC (rev 228956)
@@ -238,11 +238,11 @@
 
     setPendingActivity(this);
 
-    auto jobData = job->data();
+    auto& jobData = job->data();
     auto result = m_jobMap.add(job->identifier(), WTFMove(job));
     ASSERT_UNUSED(result, result.isNewEntry);
 
-    callOnMainThread([connection = m_swConnection, contextIdentifier = this->contextIdentifier(), jobData = WTFMove(jobData)] {
+    callOnMainThread([connection = m_swConnection, contextIdentifier = this->contextIdentifier(), jobData = jobData.isolatedCopy()] {
         connection->scheduleJob(contextIdentifier, jobData);
     });
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to