Avoid heap allocation in RemoteAudioDestinationProxy::renderQuantum() since this runs on the audio thread: Thread 11 Crashed:: RemoteAudioDestinationProxy render thread 3 com.apple.WebCore 0x00000005608bce75 WTF::FastMalloc::malloc(unsigned long) + 21 (FastMalloc.h:246) 4 com.apple.WebCore 0x00000005608bcdc2 bool WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>::allocateBuffer<(WTF::FailureAction)0>(unsigned long) + 178 (Vector.h:301) 5 com.apple.WebCore 0x00000005608bcbe1 bool WTF::Vector<unsigned char, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::reserveCapacity<(WTF::FailureAction)0>(unsigned long) + 113 (Vector.h:1195) 6 com.apple.WebCore 0x00000005608bcb10 bool WTF::Vector<unsigned char, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::expandCapacity<(WTF::FailureAction)0>(unsigned long) + 112 (Vector.h:1056) 7 com.apple.WebCore 0x00000005608bc25d WTF::Vector<unsigned char, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::resize(unsigned long) + 141 (Vector.h:1102) 8 com.apple.WebCore 0x0000000564803e34 WebCore::WebAudioBufferList::setSampleCount(unsigned int) + 244 (WebAudioBufferList.cpp:99) 9 com.apple.WebKit 0x0000000551bd8910 WebKit::RemoteAudioDestinationProxy::renderQuantum() + 144 (RemoteAudioDestinationProxy.cpp:165) 10 com.apple.WebKit 0x0000000551c0161b WebKit::RemoteAudioDestinationProxy::startRenderingThread()::$_10::operator()() + 91 (RemoteAudioDestinationProxy.cpp:87) 11 com.apple.WebKit 0x0000000551c0158e WTF::Detail::CallableWrapper<WebKit::RemoteAudioDestinationProxy::startRenderingThread()::$_10, void>::call() + 30 (Function.h:52) 12 com.apple.JavaScriptCore 0x000000057fc68552 WTF::Function<void ()>::operator()() const + 130 (Function.h:83) 13 com.apple.JavaScriptCore 0x000000057fd1cba8 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 424 (Threading.cpp:181) 14 com.apple.JavaScriptCore 0x000000057fd28d48 WTF::wtfThreadEntryPoint(void*) + 24 (ThreadingPOSIX.cpp:241) 15 libsystem_pthread.dylib 0x00007fff20686954 _pthread_start + 224 16 libsystem_pthread.dylib 0x00007fff206824a7 thread_start + 15
Created attachment 423270 [details] Patch
Committed r274459: <https://commits.webkit.org/r274459> All reviewed patches have been landed. Closing bug and clearing flags on attachment 423270 [details].
<rdar://problem/75458755>