Protect m_data when iterating in CachedRawResource::didAddClient
Created attachment 433876 [details] Patch
<rdar://problem/80716674>
Comment on attachment 433876 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433876&action=review r=me with optional nit fixes. > Source/WebCore/loader/cache/CachedRawResource.cpp:170 > if (m_data) { We could also just do: if (auto data = m_data) { and use data below instead of m_data. > Source/WebCore/loader/cache/CachedRawResource.cpp:171 > + auto protectedData = RefPtr { m_data }; instead of adding the protector here. > Source/WebCore/loader/cache/CachedRawResource.cpp:173 > + if (!hasClient(*client)) Better safe than sorry indeed. I know we like early return in WebKit, but when it's one line life this, I don't feel like it's great.
Created attachment 433877 [details] Patch
Committed r280083 (239808@main): <https://commits.webkit.org/239808@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 433877 [details].
Sadly, it seems this didn't do the trick :( <rdar://82936913>