Title: [275148] trunk/Source/WebCore
- Revision
- 275148
- Author
- cdu...@apple.com
- Date
- 2021-03-28 10:40:24 -0700 (Sun, 28 Mar 2021)
Log Message
Unreviewed, add an exception for a heap allocation on the WebAudio thread.
I recently added assertions to catch heap allocations on the WebAudio threads and failed to
mark this one as allowed (for now).
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::markForDeletion):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (275147 => 275148)
--- trunk/Source/WebCore/ChangeLog 2021-03-28 13:55:24 UTC (rev 275147)
+++ trunk/Source/WebCore/ChangeLog 2021-03-28 17:40:24 UTC (rev 275148)
@@ -1,3 +1,13 @@
+2021-03-28 Chris Dumez <cdu...@apple.com>
+
+ Unreviewed, add an exception for a heap allocation on the WebAudio thread.
+
+ I recently added assertions to catch heap allocations on the WebAudio threads and failed to
+ mark this one as allowed (for now).
+
+ * Modules/webaudio/BaseAudioContext.cpp:
+ (WebCore::BaseAudioContext::markForDeletion):
+
2021-03-27 Simon Fraser <simon.fra...@apple.com>
Allow DisplayRefreshMonitor to be more long-lived objects
Modified: trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp (275147 => 275148)
--- trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp 2021-03-28 13:55:24 UTC (rev 275147)
+++ trunk/Source/WebCore/Modules/webaudio/BaseAudioContext.cpp 2021-03-28 17:40:24 UTC (rev 275148)
@@ -762,8 +762,12 @@
if (isAudioThreadFinished())
m_nodesToDelete.append(&node);
- else
+ else {
+ // Heap allocations are forbidden on the audio thread for performance reasons so we need to
+ // explicitly allow the following allocation(s).
+ DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions;
m_nodesMarkedForDeletion.append(&node);
+ }
// This is probably the best time for us to remove the node from automatic pull list,
// since all connections are gone and we hold the graph lock. Then when handlePostRenderTasks()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes