m_sourceBufferPrivateClient is only reset to NULL from SourceBuffer's destructor. At this point SourceBufferPrivateGStreamer is about to receive its last unref by SourceBuffer and therefore be destroyed. Similarly, there is no need to check for m_mediaSource being null. m_mediaSource is only reset when the SourceBuffer is removed, and at that point SourceBufferPrivate shouldn't receive any calls. This is a clean-up and doesn't introduce new behavior. Asserts have been added checking the precondition above.
Created attachment 406164 [details] Patch
Created attachment 406166 [details] Patch
Comment on attachment 406166 [details] Patch I would be quieter if we ASSERT on the client before calling it.
(In reply to Xabier Rodríguez Calvar from comment #3) > Comment on attachment 406166 [details] > Patch > > I would be quieter if we ASSERT on the client before calling it. The way I see it, there is already an implicit assert there, built in the CPU: the pointer indirection will segfault (and crash, just like with asserts) in that same line if m_sourceBufferPrivateClient is NULL. Since it's the only pointer being indirected in that line, or the function even, an assert doesn't give us any more specificity even when looking at the traceback.
Committed r265494: <https://trac.webkit.org/changeset/265494> All reviewed patches have been landed. Closing bug and clearing flags on attachment 406166 [details].