Title: [240380] branches/safari-607-branch/Source/WebCore
- Revision
- 240380
- Author
- [email protected]
- Date
- 2019-01-23 17:21:32 -0800 (Wed, 23 Jan 2019)
Log Message
Cherry-pick r240049. rdar://problem/47458184
ServiceWorkerContainer is leaking due to a ref cycle
https://bugs.webkit.org/show_bug.cgi?id=193462
<rdar://problem/47026303>
Reviewed by Brady Eidson.
ServiceWorkerContainer keeps a reference to its ready promise.
The ready promise keeps a ref to its value which is a ServiceWorkerRegistration.
ServiceWorkerRegistration keeps a ref to ServiceWorkerContainer.
To break the reference cycle, set the ready promise to zero when ServiceWorkerContainer is stopped.
Covered by imported/w3c/web-platform-tests/service-workers/service-worker/ready.https.html no longer leaking.
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::stop):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-607-branch/Source/WebCore/ChangeLog (240379 => 240380)
--- branches/safari-607-branch/Source/WebCore/ChangeLog 2019-01-24 01:21:29 UTC (rev 240379)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog 2019-01-24 01:21:32 UTC (rev 240380)
@@ -1,5 +1,48 @@
2019-01-23 Alan Coon <[email protected]>
+ Cherry-pick r240049. rdar://problem/47458184
+
+ ServiceWorkerContainer is leaking due to a ref cycle
+ https://bugs.webkit.org/show_bug.cgi?id=193462
+ <rdar://problem/47026303>
+
+ Reviewed by Brady Eidson.
+
+ ServiceWorkerContainer keeps a reference to its ready promise.
+ The ready promise keeps a ref to its value which is a ServiceWorkerRegistration.
+ ServiceWorkerRegistration keeps a ref to ServiceWorkerContainer.
+
+ To break the reference cycle, set the ready promise to zero when ServiceWorkerContainer is stopped.
+
+ Covered by imported/w3c/web-platform-tests/service-workers/service-worker/ready.https.html no longer leaking.
+
+ * workers/service/ServiceWorkerContainer.cpp:
+ (WebCore::ServiceWorkerContainer::stop):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-01-16 Youenn Fablet <[email protected]>
+
+ ServiceWorkerContainer is leaking due to a ref cycle
+ https://bugs.webkit.org/show_bug.cgi?id=193462
+ <rdar://problem/47026303>
+
+ Reviewed by Brady Eidson.
+
+ ServiceWorkerContainer keeps a reference to its ready promise.
+ The ready promise keeps a ref to its value which is a ServiceWorkerRegistration.
+ ServiceWorkerRegistration keeps a ref to ServiceWorkerContainer.
+
+ To break the reference cycle, set the ready promise to zero when ServiceWorkerContainer is stopped.
+
+ Covered by imported/w3c/web-platform-tests/service-workers/service-worker/ready.https.html no longer leaking.
+
+ * workers/service/ServiceWorkerContainer.cpp:
+ (WebCore::ServiceWorkerContainer::stop):
+
+2019-01-23 Alan Coon <[email protected]>
+
Cherry-pick r240037. rdar://problem/47458128
Add more assertions to find root cause for release assert hit in StyleResolver
Modified: branches/safari-607-branch/Source/WebCore/workers/service/ServiceWorkerContainer.cpp (240379 => 240380)
--- branches/safari-607-branch/Source/WebCore/workers/service/ServiceWorkerContainer.cpp 2019-01-24 01:21:29 UTC (rev 240379)
+++ branches/safari-607-branch/Source/WebCore/workers/service/ServiceWorkerContainer.cpp 2019-01-24 01:21:32 UTC (rev 240380)
@@ -632,6 +632,7 @@
m_isStopped = true;
removeAllEventListeners();
m_pendingPromises.clear();
+ m_readyPromise = nullptr;
for (auto& job : m_jobMap.values())
job->cancelPendingLoad();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes