This website requires JavaScript.
Explore
Help
Sign In
nephele
/
haikuwebkit
Watch
1
Star
0
Fork
You've already forked haikuwebkit
0
Code
Issues
Releases
Activity
haiku
haikuwebkit
/
LayoutTests
/
webaudio
/
offlineaudiocontext-gc-expe...
5 lines
90 B
Plaintext
Raw
Permalink
Normal View
History
Unescape
Escape
Safari crashes after ~2028 OfflineAudioContext objects are created (they never get garbage collected, consuming a thread each) https://bugs.webkit.org/show_bug.cgi?id=198964 <rdar://problem/51891520> Reviewed by Jer Noble. Source/WebCore: Move from setPendingActivity/unsetPendingActivity to an m_pendingActivity member which is easier to manage. Keep setting a pending activity for AudioContext at construction time but do not do that for Offline contexts. Instead, set the pending activity when startRendering is called. Unset the pending activity when the rendering activity is finished. Make m_audioDecoder a unique pointer so that it can lazily be initialized. This removes the burden of creating an audio decoder thread for each context. Test: webaudio/offlineaudiocontext-gc.html * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::constructCommon): (WebCore::AudioContext::clear): (WebCore::AudioContext::decodeAudioData): (WebCore::AudioContext::startRendering): (WebCore::AudioContext::finishedRendering): (WebCore::AudioContext::dispatchEvent): (WebCore::AudioContext::clearPendingActivity): (WebCore::AudioContext::makePendingActivity): To keep it consistent with setPendingActivity/unsetPendingActivity, we explicitly ref/unref the AudioContext. We should try to remove this ref/unref. * Modules/webaudio/AudioContext.h: * Modules/webaudio/OfflineAudioDestinationNode.cpp: (WebCore::OfflineAudioDestinationNode::startRendering): LayoutTests: * webaudio/offlineaudiocontext-gc-expected.txt: Added. * webaudio/offlineaudiocontext-gc.html: Added. Canonical link: https://commits.webkit.org/213074@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-06-21 18:01:13 +00:00
Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) https://bugs.webkit.org/show_bug.cgi?id=217016 Reviewed by Zalan Bujtas. Done with this command: find LayoutTests -name '*-expected.txt' | grep -v imported | xargs awk '/^CONSOLE MESSAGE:/ { next }; /^<\?xml/ { nextfile }; { print FILENAME; nextfile }' | xargs perl -i -pe 's/ +$//g' This affects many files, and it's not helpful to clog the change log with a list of them. Canonical link: https://commits.webkit.org/229803@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-27 02:15:19 +00:00
PASS GC a newly created offline audio context
PASS GC a rendering offline audio context
Safari crashes after ~2028 OfflineAudioContext objects are created (they never get garbage collected, consuming a thread each) https://bugs.webkit.org/show_bug.cgi?id=198964 <rdar://problem/51891520> Reviewed by Jer Noble. Source/WebCore: Move from setPendingActivity/unsetPendingActivity to an m_pendingActivity member which is easier to manage. Keep setting a pending activity for AudioContext at construction time but do not do that for Offline contexts. Instead, set the pending activity when startRendering is called. Unset the pending activity when the rendering activity is finished. Make m_audioDecoder a unique pointer so that it can lazily be initialized. This removes the burden of creating an audio decoder thread for each context. Test: webaudio/offlineaudiocontext-gc.html * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::constructCommon): (WebCore::AudioContext::clear): (WebCore::AudioContext::decodeAudioData): (WebCore::AudioContext::startRendering): (WebCore::AudioContext::finishedRendering): (WebCore::AudioContext::dispatchEvent): (WebCore::AudioContext::clearPendingActivity): (WebCore::AudioContext::makePendingActivity): To keep it consistent with setPendingActivity/unsetPendingActivity, we explicitly ref/unref the AudioContext. We should try to remove this ref/unref. * Modules/webaudio/AudioContext.h: * Modules/webaudio/OfflineAudioDestinationNode.cpp: (WebCore::OfflineAudioDestinationNode::startRendering): LayoutTests: * webaudio/offlineaudiocontext-gc-expected.txt: Added. * webaudio/offlineaudiocontext-gc.html: Added. Canonical link: https://commits.webkit.org/213074@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-06-21 18:01:13 +00:00