This also enables the py2 linter which will help maintain compatibility
with both 2 and 3.
Differential Revision: https://phabricator.services.mozilla.com/D1884
--HG--
extra : moz-landing-system : lando
Since GeckoJavaSampler::Stop() isn't called from locked_profiler_stop, Java
sampler is never stopped after stopping profiler.
And when calling GeckoJavaSampler::Stop(), it causes dead lock since stop()
is acquiring lock. So when calling join method, we should release this lock.
MozReview-Commit-ID: BLREo0lH6DS
--HG--
extra : rebase_source : f9c43f3d0e2a527abf1828d023d1a962fc526bde
Similar to the previous part, we convert mBreakpadId to an nsCString to
avoid issues with locale-dependent std::string operations.
There are a lot of non-profiler changes here because a bunch of things
depend on the SharedLibrary object that the profiler defines.
Using operator<< on stringstream on Windows dives into the registry for
locale-specific formatting details. This behavior is neither desired
or (probably) anticipated by the code. Instead, let's use our normal
Gecko string classes for SharedLibrary::mVersion.
The check finds assignments of an integer to std::string:
https://clang.llvm.org/extra/clang-tidy/checks/bugprone-string-integer-assignment.html
There are currently ten misc-string-integer-assignment warnings in mozilla-central, but they are all in third-party Breakpad code:
toolkit/crashreporter/google-breakpad/src/processor/minidump.cc:306:17: warning: an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility
toolkit/crashreporter/google-breakpad/src/processor/minidump.cc:307:17: warning: an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility
toolkit/crashreporter/google-breakpad/src/processor/minidump.cc:309:17: warning: an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility
toolkit/crashreporter/google-breakpad/src/processor/minidump.cc:310:17: warning: an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility
toolkit/crashreporter/google-breakpad/src/processor/minidump.cc:311:17: warning: an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility
toolkit/crashreporter/google-breakpad/src/processor/minidump.cc:313:17: warning: an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility
toolkit/crashreporter/google-breakpad/src/processor/minidump.cc:314:17: warning: an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility
toolkit/crashreporter/google-breakpad/src/processor/minidump.cc:315:17: warning: an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility
toolkit/crashreporter/google-breakpad/src/processor/minidump.cc:316:17: warning: an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility
MozReview-Commit-ID: AUOyOuCzy1R
--HG--
extra : source : 93356b5c58539d19c27dade7b1514bae709bc149
extra : histedit_source : 4bc38ab5a7a50869aaf4fce87aa2f75ce9dd301a
Finds string constructors that are suspicious and probably errors. There are currently no misc-string-constructor warnings in mozilla-central!
https://clang.llvm.org/extra/clang-tidy/checks/bugprone-string-constructor.html
MozReview-Commit-ID: LyJt6wqOhg9
--HG--
extra : source : 0b36b6b1b7931adec5846086a52080edb3ec5e7d
extra : histedit_source : 30249980b219d4813fc5503c87e84265ad354e2f
This check finds memset() calls with potential mistakes in their arguments. There are currently no bugprone-suspicious-memset-usage warnings in mozilla-central!
https://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-memset-usage.html
MozReview-Commit-ID: 9gmtidgMPwW
--HG--
extra : source : 9c6f6e1553c45751f476c2d8418b9d4735e27e50
extra : histedit_source : 721536e24babf3734e116bd6beaf8d43722cca96
Check for memory leaks, double free, and use-after-free and offset problems involving malloc. There are currently no clang-analyzer-unix.Malloc warnings in mozilla-central!
https://clang-analyzer.llvm.org/available_checks.html
MozReview-Commit-ID: G32SlokD64O
--HG--
extra : source : a2c8ccd2da1968b64510569f12f4631c54fea2d8
extra : histedit_source : b42c3ce2c3f8132fc0b301e6309b5ad25192167c
Check for null pointers being passed as arguments to C string functions. There are no clang-analyzer-unix.cstring.NullArg warnings in mozilla-central!
strlen
strnlen
strcpy
strncpy
strcat
strncat
strcmp
strncmp
strcasecmp
strncasecmp
https://clang-analyzer.llvm.org/available_checks.html
MozReview-Commit-ID: EkfaItfo5cu
--HG--
extra : source : e05c6cfa3b8ae6b3234ebf5e4895475bc623edcd
extra : histedit_source : 6aa97bb8d82884fb2ac92793df9defd7a7985e89
Check the size argument passed to strncat for common erroneous patterns. There are currently no clang-analyzer-unix.cstring.BadSizeArg warnings in mozilla-central!
https://clang-analyzer.llvm.org/available_checks.html
MozReview-Commit-ID: DUI3ZNIBoLQ
--HG--
extra : source : 8dafc73215cddd2737b4d8dbcb926521736d98c2
extra : histedit_source : ed27a98e47c01c9951c03eb2129ed4997f3cf624
This check finds unused namespace alias declarations. There are currently no misc-unused-alias-decls warnings in mozilla-central!
https://clang.llvm.org/extra/clang-tidy/checks/misc-unused-alias-decls.html
MozReview-Commit-ID: LHziGESvaM5
--HG--
extra : rebase_source : f10fbb6364bc947b5fa2ca8c0b47494519856940
extra : source : 987ca732290093c4bd36690c6ebd3ed2ac0b5444
This check finds potentially swapped function arguments by looking at implicit conversions. There are currently no misc-swapped-arguments warnings in mozilla-central!
https://clang.llvm.org/extra/clang-tidy/checks/bugprone-swapped-arguments.html
MozReview-Commit-ID: 6SETUcQhQP
--HG--
extra : rebase_source : d364fc90e776807ab2540d714594d07a5a83b054
extra : source : 689980bf12e98780d0d60c851549d16a4cc8efb0
This check finds side effects from repeated macro arguments:
https://clang.llvm.org/extra/clang-tidy/checks/bugprone-macro-repeated-side-effects.html
There are currently 16 misc-macro-repeated-side-effects warnings in mozilla-central, but they are all in third-party gfx/cairo code:
gfx/cairo/cairo/src/cairo-tor-scan-converter.c:1432:10: warning: side effects in the 1st macro argument 'x' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1011:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1037:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1062:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1088:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1107:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1126:27: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1194:21: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1258:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:600:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:629:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:660:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:690:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:721:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:986:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-edge-imp.h:126:20: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
MozReview-Commit-ID: CQ6iO9JO773
--HG--
extra : rebase_source : 0e7dc6fa3990ab187c597d8042a403c554152b02
extra : source : 5f47d400d53107df0e0478b369745bfd3f055702
Check for memory leaks. Traces memory managed by new/ delete. There are currently no clang-analyzer-cplusplus.NewDeleteLeaks warnings in mozilla-central!
https://clang-analyzer.llvm.org/available_checks.html
MozReview-Commit-ID: 3tmwR26UB8K
--HG--
extra : rebase_source : 3796cc6b61c03e83ce8b390e3342b870085b2ed2
extra : source : 3389fb54d2e3daee38db38503b37e9d994878bcd
Check for double-free, use-after-free and offset problems involving C++ delete. There are currently no clang-analyzer-cplusplus.NewDelete warnings in mozilla-central!
https://clang-analyzer.llvm.org/available_checks.html
MozReview-Commit-ID: 9sVp4fc4JTj
--HG--
extra : rebase_source : 733974ff07b873f6e5cd1e83104f82eafbf7f3c7
extra : source : 778684b276e6658fb9f3fa125aaec984cca8760a
One of the big downsides to |mach try fuzzy| is that if you use the interactive
finder, there's no way to repeat your last action. If you want to run the same
push again, you have to manually re-select all the same tasks a second time.
It is possible to save presets, but this is fairly heavy-weight and (more)
permanent. Sometimes you just want to re-run a push a few times and forget
about it. It's also possible to craft the query on the command line with -q,
but then you don't get the immediate visual feedback, so you can't be sure that
you typed out the right things without actually pushing.
With |mach try again|, everytime you generate a try_task_config.json via
'fuzzy', 'empty' or any other subcommands that may exist in the future, it'll
get stored in a history file under ~/.mozbuild. Then running |mach try again|
will simply re-run the most recent try_task_config.json.
You'll also be able to view the whole history via |mach try again --list| and
select a specific try_task_config.json (i.e not the most recent one) via
|mach try again --index <index>|.
Example usage will be:
$ ./mach try fuzzy
<select a bunch of tasks>
$ ./mach try again
<re-pushes exact same set of tasks>
MozReview-Commit-ID: 3EZjVCy08uq
Depends on D1808.
Differential Revision: https://phabricator.services.mozilla.com/D1867
--HG--
extra : moz-landing-system : lando
This fixes a regression from bug 1454640 where urls had an extra 'docs' path inserted into them, e.g:
toolkit/components/telemetry/telemetry/index.html
became:
toolkit/components/telemetry/docs/telemetry/index.html
Differential Revision: https://phabricator.services.mozilla.com/D2079
--HG--
extra : histedit_source : 15c679e2f9366c1ea424adc4c82d7c184d80b3bb
This prevents accidental changes to package-lock.json when ESLint's setup runs 'npm install'.
Also revert the recent accidental changes to package-lock.json.
MozReview-Commit-ID: 21ebhOlQcMv
Differential Revision: https://phabricator.services.mozilla.com/D2118
--HG--
extra : moz-landing-system : lando
We're supposed to be linting both .py and .configure files with flake8. However
we never inform flake8 of this fact.
So e.g running:
./mach lint -l flake8 mobile/android
Will not lint mobile/android/gradle.configure. However since flake8 will run on
a file regardless of its extension if you pass that file in directly, it means
that running:
./mach lint -l flake8 mobile/android/gradle.configure
*Will* cause the file to be linted (and subsequently fail). This fix makes sure
that flake8 knows to look at .configure files in addition to .py. Since this
means many .configure files around the tree will start getting linted for the
first time, we need to exclude them until they can be fixed.
Differential Revision: https://phabricator.services.mozilla.com/D1975
--HG--
extra : moz-landing-system : lando