Closed
Bug 1376628
Opened 8 years ago
Closed 8 years ago
Static analysis fixes in dom/base/
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: janx, Assigned: janx)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
2.86 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
Don't use 'else' after 'break' or 'return' in dom/base/ (clang-tidy: readability-else-after-return).
1.64 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
5.16 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
2.79 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
There are a few larges files in dom/base/ [0] that present opportunities for quick automated improvements using clang-tidy [1].
[0] For example:
- dom/base/nsContentUtils.cpp
- dom/base/nsDOMWindowUtils.cpp
- dom/base/nsGlobalWindow.cpp
[1] Using auto-fixable rules like:
- modernize-use-nullptr
- readability-else-after-return
- performance-for-range-copy
Assignee | ||
Comment 1•8 years ago
|
||
Assignee | ||
Comment 2•8 years ago
|
||
Assignee | ||
Comment 3•8 years ago
|
||
Assignee | ||
Comment 4•8 years ago
|
||
Assignee | ||
Comment 5•8 years ago
|
||
Comment on attachment 8881619 [details] [diff] [review]
Annotate methods with 'override' where possible in dom/base/ (clang-tidy: modernize-use-override).
Review of attachment 8881619 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/nsContentUtils.cpp
@@ +538,5 @@
> NS_DECL_NSIOBSERVER
>
> void Init();
> void Shutdown();
> + void AnnotateHang(HangMonitor::HangAnnotations& aAnnotations) override;
Note: This is a slightly unrelated drive-by fix ('virtual' is unnecessary because 'override' already implies it).
Assignee | ||
Comment 6•8 years ago
|
||
Assignee | ||
Comment 7•8 years ago
|
||
Comment on attachment 8881616 [details] [diff] [review]
Use nullptr where possible in dom/base/ (clang-tidy: modernize-use-nullptr).
Ehsan, please have a look when convenient.
Also, please indicate if any changes are not worth the effort / shouldn't be pursued.
Attachment #8881616 -
Flags: review?(ehsan)
Assignee | ||
Updated•8 years ago
|
Attachment #8881617 -
Flags: review?(ehsan)
Assignee | ||
Updated•8 years ago
|
Attachment #8881618 -
Flags: review?(ehsan)
Assignee | ||
Updated•8 years ago
|
Attachment #8881619 -
Flags: review?(ehsan)
Updated•8 years ago
|
Attachment #8881616 -
Flags: review?(ehsan) → review+
Updated•8 years ago
|
Attachment #8881617 -
Flags: review?(ehsan) → review+
Updated•8 years ago
|
Attachment #8881618 -
Flags: review?(ehsan) → review+
Updated•8 years ago
|
Attachment #8881619 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 8•8 years ago
|
||
Thank you Ehsan!
Sheriffs, please land these fixes.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/075df18a0a58
Use nullptr where possible in dom/base/ (clang-tidy: modernize-use-nullptr). r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/b7021a785963
Don't use 'else' after 'break' or 'return' in dom/base/ (clang-tidy: readability-else-after-return). r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/ab7c82c4c34c
Change loop variable copies to const references where possible in dom/base/ (clang-tidy: performance-for-range-copy). r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/7095cd0f91c7
Annotate methods with 'override' where possible in dom/base/ (clang-tidy: modernize-use-override). r=ehsan
Keywords: checkin-needed
Comment 10•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/075df18a0a58
https://hg.mozilla.org/mozilla-central/rev/b7021a785963
https://hg.mozilla.org/mozilla-central/rev/ab7c82c4c34c
https://hg.mozilla.org/mozilla-central/rev/7095cd0f91c7
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•