Closed Bug 1372977 Opened 2 years ago Closed 2 years ago

Use nullptr in /media and /dom/media (clang-tidy: modernize-use-nullptr)


(Core :: Audio/Video: Playback, enhancement)

47 Branch
Not set



Tracking Status
firefox56 --- fixed


(Reporter: janx, Assigned: janx)


(Blocks 1 open bug)



(1 file, 2 obsolete files)

In /media and /dom/media there are several opportunities to use `nullptr` instead of `0` or `NULL`.

These can be automatically identified and acted on by the clang-tidy static analyzer (rule "modernize-use-nullptr").
This patch was generated with the following command: -p obj-x86_64-pc-linux-gnu/ -fix -checks=-*,modernize-use-nullptr dom/media/,media/
Attachment #8877676 - Flags: review?(padenot)
more of the code in /media is from 3rd party libs, very few is our own code (the exception is media/libstagefright/bindings).

So we shouldn't touch that, only makes resyncing with upstream difficult
Attachment #8877676 - Flags: review?(padenot) → review-
I omitted libstagefright and ffmpeg on purpose. Please indicate which files in my patch are from external libraries so I can omit any fixes there. Thanks!
Flags: needinfo?(jyavenard)
all in media/ ?

the one in dom/media are fine.
Flags: needinfo?(jyavenard)
Component: Audio/Video → Audio/Video: Playback
> all in media/ ?
> the one in dom/media are fine.

Thanks! But media/mtransport/ should be fine (according to tools/rewriting/ThirdPartyPaths.txt).

Paul, please have a look.
Attachment #8881447 - Flags: review?(padenot)
Attachment #8877676 - Attachment is obsolete: true
Attachment #8881447 - Flags: review?(padenot) → review?(docfaraday)
Attachment #8881447 - Flags: review?(docfaraday) → review+
Thanks Paul and Byron! Rebased and updated to "r=bwc".
Attachment #8881987 - Flags: review+
Attachment #8881447 - Attachment is obsolete: true
Sheriffs, please land this patch.
Keywords: checkin-needed
Pushed by
Use nullptr in /media and /dom/media (clang-tidy: modernize-use-nullptr). r=bwc
Keywords: checkin-needed
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.