The eslint task ignores warnings, therefore the vcs hook should as well. The --quiet argument will
be ignored by other linters.
This also makes tools/lint/hooks.py executable which was preventing it from being used on git.
MozReview-Commit-ID: DXbx01shJmX
--HG--
extra : rebase_source : 9c80a069f486c0b6b7b9c970b84d44b964c59a0f
The profiler writes ProfileBuffer entries in a particular order, and then later
has to parse them, mostly in StreamSamplesToJSON(). That function's parsing
code is poorly structured and rather gross, at least partly because no explicit
grammar is identified.
This patch identifies the grammar in a comment, and in the same comment also
includes some examples of the more complicated subsequences. Once written down,
the grammar is obviously suboptimal -- the |Sample| entries serve no useful
purpose, for example -- but I will leave grammar improvements as follow-ups.
The patch also rewrites the parser in a more typical fashion that obviously
matches the grammar. The new parser is slightly more verbose but far easier to
understand.
--HG--
extra : rebase_source : 762c21a68cdc18ff25b5feda3c5dfcf33afa53be
This adds pre-push and pre-commit hooks for both hg and git. All
four possibilities are implemented in the same file.
To enable a pre-push hg hook, add the following to hgrc:
[hooks]
pre-push.lint = python:/path/to/gecko/tools/lint/hooks.py:hg
To enable a pre-commit hg hook, add the following to hgrc:
[hooks]
pretxncommit.lint = python:/path/to/gecko/tools/lint/hooks.py:hg
To enable a pre-push git hook, run the following command:
$ ln -s /path/to/gecko/tools/lint/hooks.py .git/hooks/pre-push
To enable a pre-commit git hook, run the following command:
$ ln -s /path/to/gecko/tools/lint/hooks.py .git/hooks/pre-commit
MozReview-Commit-ID: DUxCKN2fiag
--HG--
extra : rebase_source : 67c97a3fd8adc50d6bb3c488345077065b63de7d
The patch also changes ProfileBuffer::processEmbeddedString() to take the
readAheadPos, instead of recomputing it.
--HG--
extra : rebase_source : 62bacb4c7cc61f43d78ada342af0a813c307b96a
The double variant is always 8 bytes, so the chars variant can be too. As well
as reducing memory usage on 32-bit platforms, this patch makes the code
clearer.
--HG--
extra : rebase_source : 8f3dd0a1e35c18ac812fa5db7c3f6e4626447c4c
- It's common for unions to be named |u|, because this makes it obvious that
it's a union when you access it, which is good. This patch introduces that
for the union in ProfilerBufferEntry. (This required move the union setting in
each constructor from the initializer list to the constructor body.)
- Each union variant had the prefix "mTag". But that's a bad name, because
|mKind| is actually the tag. So this patch removes the "Tag".
- |mTagData| was a poor name for the |const char*| variant, so this patch
renames it |mString|.
- The patch moves |mKind| before |u|, because that's the normal way that tagged
unions are done.
--HG--
extra : rebase_source : 563cbcf6414fa3c45abcdd5eafd99965bb842de5
If marker pointer is null the uses of it will immediately crash, so asserting
non-nullness doesn't add much. And removing the getter makes it more similar to
the other union variants.
--HG--
extra : rebase_source : a1066ef98ac5d2dae5303b465106b844937cfb73
This requires:
- Moving the constructors of ProfilerMarkerPayload and its subclasses into the
.h file so they are visible even when ProfilerMarkerPayload.cpp isn't
compiled.
- Similarly, using a macro to make StreamPayload() a crashing no-op when the
profiler isn't enabled. (It is never called in that case.)
--HG--
extra : rebase_source : 7aad2fdb1bd4e49782024dba6664e8f992771520
No point having all these explicit empty destructors.
Also, we can avoid IOMarkerPayload's constructor by using a UniqueFreePtr.
--HG--
extra : rebase_source : 0a2a5aecb66a2990c9188354c861f67633ed2fee
Currently LUL is a member of CorePS, meaning that it is guarded by the PSMutex.
This mutex is grabbed by the main thread at random points during the execution
of the program. This is unfortunate, as initializing LUL can take a long
time (>1s on my local machine), and we definitely don't want to be blocking the
main thread waiting for it.
In addition, in the BHR case, we used to be grabbing LUL when we got our first
hang, while both the PSMutex and the BHR monitor were being held. This meant
that the main thread could make no progress during LUL initializaion, as the BHR
monitor is grabbed by the main thread on every spin of the event loop.
This patch moves that initialization to be behind a completely separate lock,
and makes BHR initialize it on the background thread before acquiring the BHR
lock, meaning that no locks other than the one guarding LUL should be held
during its initialization.
MozReview-Commit-ID: GwNYQaEAqJ1
The whitelisting function thisTestLeaksUncaughtRejectionsAndShouldBeFixed was replaced by expectUncaughtRejection, and existing calls did not take effect anymore.
MozReview-Commit-ID: 3uOxkgWYWEz
--HG--
extra : rebase_source : 6b27b77da78743880529adae7adf4ec2aa64dfea
extra : intermediate-source : 5809a30a0c4817509beb1078cf336d8367b8107a
extra : source : 6f0394b523a66dab444b8551deb8f3c6c81d8f31
Change how comments are handled due to ESLint's 4 reworked comment handling.
MozReview-Commit-ID: BG4cvbhy45Z
--HG--
extra : rebase_source : 8fc4d40bf2a8cb74be7964c9d308c056edf51058
Trivial update to Python package paths to reflect their new location.
MozReview-Commit-ID: EWaIHrLFWgD
--HG--
extra : rebase_source : b3a033bffe6f8f933807d6e71dccd49c37c75844