Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regression(274445@main): Crash under HTMLMediaElement::updateActiveTe…
…xtTrackCues() on Hulu.com https://bugs.webkit.org/show_bug.cgi?id=269394 rdar://122959342 Reviewed by Jer Noble. In 274445@main, I updated CueInterval to be an alias to: ``` PODInterval<MediaTime, WeakPtr<TextTrackCue, WeakPtrImplWithEventTargetData>> ``` instead of: ``` PODInterval<MediaTime, TextTrackCue*> ``` per our recent smart pointer guidelines. When doing do, I noticed that PODInterval has different implementations when the second type is a WeakPtr. Adopting WeakPtr led to build errors because the PODInterval's specialization for WeakPtr was missing operator==(). To fix the build, I copied the generic PODInterval's operator==() and used it. However, I failed to noticed that the 2 specializations had different operator<() implementations as well. In particular, the generic operator<() was checking userData while the WeakPtr specialization one wasn't. This mismatch between operator==() (which was checking userData) and operator<() (which wasn't checking userData) was the cause of these crashes. I now updated operator<() to be the same of both specializations (except for calling `.get()` to extract the raw pointer from the WeakPtr) and this addressed the crashes on hulu.com. * Source/WebCore/platform/PODInterval.h: Canonical link: https://commits.webkit.org/274670@main
- Loading branch information