Make Document audio producers use WeakPtr
Created attachment 368483 [details] Patch
<rdar://problem/50309081>
Created attachment 368513 [details] Patch
Comment on attachment 368513 [details] Patch Clearing flags on attachment: 368513 Committed r244773: <https://trac.webkit.org/changeset/244773>
All reviewed patches have been landed. Closing bug.
It appears that after changes in https://trac.webkit.org/changeset/244773 is causing several assertion failures on Debug testers https://build.webkit.org/results/Apple%20iOS%2012%20Simulator%20Debug%20WK2%20(Tests)/r244775%20(3505)/results.html https://build.webkit.org/results/Apple%20High%20Sierra%20Debug%20WK2%20(Tests)/r244776%20(7619)/results.html Crash Log: ASSERTION FAILED: !m_audioProducers.hasNullReferences() ./dom/Document.cpp(3929) : void WebCore::Document::updateIsPlayingMedia(uint64_t) 1 0x61d14be89 WTFCrash 2 0x621b8f59b WTFCrashWithInfo(int, char const*, char const*, int) 3 0x623ef330d WebCore::Document::updateIsPlayingMedia(unsigned long long) 4 0x623ef351e WebCore::Document::removeAudioProducer(WebCore::MediaProducer&) 5 0x623629063 WebCore::MediaStreamTrack::~MediaStreamTrack() 6 0x6236291e5 WebCore::MediaStreamTrack::~MediaStreamTrack() 7 0x623629289 WebCore::MediaStreamTrack::~MediaStreamTrack() https://build.webkit.org/results/Apple%20iOS%2012%20Simulator%20Debug%20WK2%20(Tests)/r244775%20(3505)/imported/w3c/web-platform-tests/webrtc/RTCIceTransport-extension.https-crash-log.txt Also an API failure on iOS Simulator Debug TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS 2019-04-30 10:52:49.866 TestWebKitAPI[48813:5640405] *** Warning: <AVPlayerViewController: 0x7fde72084800> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior. 2019-04-30 10:52:50.763 TestWebKitAPI[48813:5640405] *** Warning: <AVPlayerViewController: 0x7fde71042c00> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior. >>>> frameSizeChanged = 4096 >>>> frameSizeChanged = 4096 2019-04-30 10:52:51.207 TestWebKitAPI[48813:5640405] *** Warning: <AVPlayerViewController: 0x7fde718b9c00> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior. 2019-04-30 10:52:51.682 TestWebKitAPI[48813:5640405] *** Warning: <AVPlayerViewController: 0x7fde72874600> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior. ASSERTION FAILED: !m_audioProducers.hasNullReferences()
Re-opened since this is blocked by bug 197436
Created attachment 368618 [details] Relanding
I am not able to repro locally the debug ASSERT. I removed it from the landing patch though.
> Also an API failure on iOS Simulator Debug > > TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS > 2019-04-30 10:52:49.866 TestWebKitAPI[48813:5640405] *** Warning: > <AVPlayerViewController: 0x7fde72084800> is trying to enter full screen, but > is not in its view's window's view controller hierarchy. This results in > undefined behavior. > 2019-04-30 10:52:50.763 TestWebKitAPI[48813:5640405] *** Warning: > <AVPlayerViewController: 0x7fde71042c00> is trying to enter full screen, but > is not in its view's window's view controller hierarchy. This results in > undefined behavior. > >>>> frameSizeChanged = 4096 > >>>> frameSizeChanged = 4096 > 2019-04-30 10:52:51.207 TestWebKitAPI[48813:5640405] *** Warning: > <AVPlayerViewController: 0x7fde718b9c00> is trying to enter full screen, but > is not in its view's window's view controller hierarchy. This results in > undefined behavior. > 2019-04-30 10:52:51.682 TestWebKitAPI[48813:5640405] *** Warning: > <AVPlayerViewController: 0x7fde72874600> is trying to enter full screen, but > is not in its view's window's view controller hierarchy. This results in > undefined behavior. > ASSERTION FAILED: !m_audioProducers.hasNullReferences() Given this crash, I would think HTMLMediaElement to be triggering this ASSERT since there is neither media stream track nor web audio.
Comment on attachment 368618 [details] Relanding Clearing flags on attachment: 368618 Committed r244815: <https://trac.webkit.org/changeset/244815>