author Ralph Giles <giles@mozilla.com>
Tue, 31 Jan 2017 17:24:17 -0800
changeset 360930 931cbdebf471a80bddf8d834093c5ea6601e87c5
parent 352179 2e262535fc7358975b86240798c75cf624f39870
permissions -rw-r--r--
Bug 1333931 - Handle nullptr TextTrack objects in sorting. r=kinetik Check for nullptr arguments passed to CompareTextTracks. Based on Ben Kelly's analysis this can happen if the cycle collector has cleared a TextTrack pointer while comparision is still happening, perhaps in a queued event task. This change makes nullptr sort to the end, and adds a MOZ_DIAGNOSTIC_ASSERT for trying to get the position of a nullptr track should someone add another call at a later date.

# Checks run by clang-tidy over Mozilla code.

# The following checks are currently enabled:
# * modernize-raw-string-literal -
#     Replace string literals containing escaped characters with raw string literals
# * modernize-use-bool-literals
#     Replace integer literals which are cast to bool
# * modernize-loop-convert
#     Converts for(...; ...; ...) loops to use the new range-based loops in C++11
# * modernize-use-default
#     Replace default bodies of special member functions with = default;
# * modernize-use-override
#     Use C++11's override and remove virtual where applicable

Checks:          '-*, modernize-raw-string-literal, modernize-use-bool-literals, modernize-loop-convert, modernize-use-default, modernize-use-override'