In order to remove support for non-bootstrapped extensions, the remaining test
automation extensions need to be migrated to bootstrapped extensions. These
extensions all work by loading a single component, either with a
profile-after-change or command line handler. This is a straightforward
conversion of those components to bootstrap.js scripts.
MozReview-Commit-ID: 5uyNSqRPIVR
--HG--
rename : services/sync/tps/extensions/tps/components/tps-cmdline.js => services/sync/tps/extensions/tps/bootstrap.js
rename : testing/talos/talos/pageloader/components/tp-cmdline.js => testing/talos/talos/pageloader/bootstrap.js
rename : testing/talos/talos/startup_test/sessionrestore/addon/SessionRestoreTalosTest.js => testing/talos/talos/startup_test/sessionrestore/addon/bootstrap.js
rename : testing/talos/talos/talos-powers/components/TalosPowersService.js => testing/talos/talos/talos-powers/bootstrap.js
rename : tools/quitter/QuitterObserver.js => tools/quitter/bootstrap.js
extra : rebase_source : 738264d0ec8701aa5cf93c6dac958d88756c1e55
extra : source : 71d65d6b64997bc608a1cb3c924be35bbd460b39
Move and rename the server's process script (and accompanying JSM) that starts
DevTools for an entire content process from `content-process-debugger-server.js`
to `startup/content-process.js`. `connectToContent` also becomes the more
specific `connectToContentProcess`.
These code paths will likely change more as Site Isolation work continues, but
for now, we have this light cleanup to gather startup-related paths together.
MozReview-Commit-ID: 1evbZMB8T7r
--HG--
rename : devtools/server/content-process-debugger-server.js => devtools/server/startup/content-process.js
rename : devtools/server/content-server.jsm => devtools/server/startup/content-process.jsm
extra : rebase_source : e077dd3dc915ec274f866d53d3539909f8440de1
In order to remove support for non-bootstrapped extensions, the remaining test
automation extensions need to be migrated to bootstrapped extensions. These
extensions all work by loading a single component, either with a
profile-after-change or command line handler. This is a straightforward
conversion of those components to bootstrap.js scripts.
MozReview-Commit-ID: 5uyNSqRPIVR
--HG--
rename : services/sync/tps/extensions/tps/components/tps-cmdline.js => services/sync/tps/extensions/tps/bootstrap.js
rename : testing/talos/talos/pageloader/components/tp-cmdline.js => testing/talos/talos/pageloader/bootstrap.js
rename : testing/talos/talos/startup_test/sessionrestore/addon/SessionRestoreTalosTest.js => testing/talos/talos/startup_test/sessionrestore/addon/bootstrap.js
rename : testing/talos/talos/talos-powers/components/TalosPowersService.js => testing/talos/talos/talos-powers/bootstrap.js
rename : tools/quitter/QuitterObserver.js => tools/quitter/bootstrap.js
extra : rebase_source : 2df7dce1afe4e9e4054d12adfc1553e5f5d417e2
You can still run them on a --disable-stylo build, as long as that works
(presumably not for long).
I think I haven't missed anything, but please double-check.
MozReview-Commit-ID: 3BIAEjgTLo5
Also change eslint-plugin-mozilla's globals.js to use eslint-scope rather than escope as
ESLint 4.x changed to eslint-scope. This avoids dependency issues that were masked by the
depedencies of eslint-plugin-no-unsanitized's previous version.
MozReview-Commit-ID: 6wLY7Oj0am3
--HG--
extra : rebase_source : 863313d7907e8246d1f5b0ee83164cc0f943f8f6
The shims that this rule tests for no longer exist.
MozReview-Commit-ID: DMgP7Hczavc
--HG--
extra : rebase_source : 765ddd5c62c9449c07ed050e44d86a3bd5c0ae64
extra : amend_source : 627a7694ac07182200f876901ded7a34721cd228
There a few pieces needed here to properly handle KeyboardInterrupts.
1. All in-progress work needs to abort. Ideally the underlying linters will be
able to catch KeyboardInterrupt, and return partial results (like the flake8
linter does). Linters may alternatively allow the KeyboardInterrupt to
propagate up. Mozlint will catch and handle this appropriately, though any
results found will be lost. The only change to this behaviour was fixing a bug
in the flake8 linter.
2. Any unstarted jobs need to be canceled. In concurrent.futures, there are two
different queues. First, jobs are placed on the work queue, which is just a list
maintained by the parent process. As workers become available, jobs are moved
off the work queue, and onto the call queue (which is a multiprocessing.Queue).
Jobs that live on the work queue can be canceled with 'future.cancel()', whereas
jobs that live on the call queue cannot. The number of extra jobs that are stored
on the call queue is determined by this variable:
https://hg.mozilla.org/mozilla-central/file/deb7714a7bcd/third_party/python/futures/concurrent/futures/process.py#l86
In this patch, the parent process' sigint handler (which will be called on Ctrl-C)
is responsible for canceling all the jobs on the work queue. For the jobs on the
call queue, the best we can do is set a global variable that tells workers to
abort early.
3. Idle workers should exit gracefully. When there are no more jobs left, workers
will block on the call queue (either waiting for more jobs, or waiting for the
executor to send the shutdown signal). If a KeyboardInterrupt is received while a
worker is blocking, it isn't possible to intercept that anywhere (due to quirks
of how concurrent.futures is implemented). The InterruptableQueue class was
created to solve this problem. It will return None instead of propagating
KeyboardInterrupt. A None value will wake the worker up and tell it to gracefully
shutdown. This way, we avoid cryptic tracebacks in the output.
With all of these various pieces solved, pressing Ctrl-C appears to always exit
gracefully, sometimes even printing partial results.
MozReview-Commit-ID: 36Pe3bbUKmk
--HG--
extra : rebase_source : d4c312ee5cc3679eeee1407c5521aed679f84ad4
extra : source : a93a00141bf62f6bc9e30934c0e56f6b2e434bf0
Thunderbird is currently still building on macOS, where `mktemp` requires an
argument.
MozReview-Commit-ID: DCoZAYA6tTI
--HG--
extra : rebase_source : 48775eba4f934fd244a74da615bc7754370b504e
The overlay was responsible for script loading and defining three elements
(bhTooltip, placesCommands, placesContext). In the majority of places where
the overlay was included only part of it was used. To remove the overlay, the
elements were each split into include files and moved into where they
were used. For the scripts, a JS file was added that defines all the lazy
modules and then this script, globalOverlay.js and utilityOverlay.js were
inlined to everywhere that would have included them from the overlay.
MozReview-Commit-ID: 8T5D46oYWLn
--HG--
rename : browser/components/places/content/placesOverlay.xul => browser/components/places/content/placesCommands.inc.xul
rename : browser/components/places/content/placesOverlay.xul => browser/components/places/content/placesContextMenu.inc.xul
extra : rebase_source : c1071af4ea264a95183cbc65caae98feb23d58e5
Move the main contents of editBookmarkOverlay.xul into an include file and
inline the DTD and CSS files where used. Convert several chrome tests to
browser tests since the preprocessor is hard to use within the testing
framework.
MozReview-Commit-ID: DpPBOpZSuBN
--HG--
rename : browser/components/places/content/editBookmarkOverlay.js => browser/components/places/content/editBookmark.js
rename : browser/components/places/content/editBookmarkOverlay.xul => browser/components/places/content/editBookmarkPanel.inc.xul
rename : browser/components/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul => browser/components/places/tests/browser/browser_bug427633_no_newfolder_if_noip.js
rename : browser/components/places/tests/chrome/test_bug485100-change-case-loses-tag.xul => browser/components/places/tests/browser/browser_bug485100-change-case-loses-tag.js
rename : browser/components/places/tests/chrome/test_bug631374_tags_selector_scroll.xul => browser/components/places/tests/browser/browser_bug631374_tags_selector_scroll.js
rename : browser/components/places/tests/chrome/test_editBookmarkOverlay_keywords.xul => browser/components/places/tests/browser/browser_editBookmark_keywords.js
rename : browser/components/places/tests/chrome/test_editBookmarkOverlay_tags_liveUpdate.xul => browser/components/places/tests/browser/browser_editBookmark_tags_liveUpdate.js
rename : browser/themes/linux/places/editBookmarkOverlay.css => browser/themes/linux/places/editBookmark.css
rename : browser/themes/osx/places/editBookmarkOverlay.css => browser/themes/osx/places/editBookmark.css
rename : browser/themes/windows/places/editBookmarkOverlay.css => browser/themes/windows/places/editBookmark.css
extra : rebase_source : aca072691251c1a44e82ab8091796abd2b140e22
This essentially tests tools/lint/python/flake8.py. Though it also adds
a basic framework for testing all the other linters as well. Getting this
added now will allow others to collaborate on adding more tests without
needing to get to 100% coverage for all linters right off the bat.
All python tests under tools/lint/test will run as part of the 'ml' task
on Linux, and the build task on Windows (OSX coverage is currently missing
for python tests).
The flake8 linter currently has a bug where the 'exclude' argument is
ignored. This is why we need to also exclude 'tools/lint/test/files' in
topsrcdir/.flake8, even though it is already listed in the
'mach_commands.py'. Other linters shouldn't need to do this, the exclusion
in 'mach_commands.py' should be good enough. See bug 1277851 for more
details.
MozReview-Commit-ID: 9ho8C83eeuj
--HG--
extra : rebase_source : 0adb01aa81c06f26cb891ae9f92a17f8f9fdf111
MinGW headers are all lowercase, and because we build FF with MinGW
on Linux - capitalization matters. But if you're plugging along,
working on Windows, you might forget about that, and wind up
inadvertently breaking the MinGW build because you capitalized
an include file (as is common in Windows development.)
This lint job takes the list of header files from MinGW
(generated by cd mingw-w64/mingw-w64-headers &&
find . -name "*.h" | xargs -I bob -- basename bob | sort | uniq)
and will alert if they are in an #include statement but not
all-lowercase.
MozReview-Commit-ID: 4QFSdHx5Uak
--HG--
extra : rebase_source : d76c258191d4cbb7665775bd1b8d79028890727f
console.assert keeps the same semantics as NS_ASSERT in that it doesn't throw an exception,
but a lot of the places code was using it in a way that would be better served by throwing
an exception when the condition is false.
MozReview-Commit-ID: DEF5HSfYO36
This changeset changes behavior.
If the profile is streamed before any JSContext has gone away, we now iterate
over the entire buffer twice (per thread): First, to collect information about
JIT frames, and then again when we build the JSON for the samples. The first
traversal stores small pieces of JSON for JIT fromes in individual strings, and
the second iteration splices those strings into the thread JSON's frame table.
When the JSContext for a thread goes away, we no longer build JSON for samples,
and we don't reset the profiler buffer. We now only build the JSON for JIT
frames. Once the complete profile is requested and we build samples for it, we
iterate over the entire buffer, and look up the cached JIT frame information for
JitReturnAddr entries from the correct range. Different parts of the buffer may
correspond to the life time of different JSContexts: For each JSContext we will
have one range in the JITFrameInfo, and we can look up the correct range based
on the buffer position of the JitReturnAddr entry that we're processing.
This new way of doing things has multiple advantages:
- We no longer reset the buffer, so we no longer lose information about other
threads.
- All threads from a given process now always have sample data for the same
time range. Before this change, the "partial profile" from a thread that
lost its JSContext could extend further into the past than the other threads'
profiles.
- Requesting profiles multiple times now has more consistent results. Before
this change, the first requested profile would include the partial profile,
but then the partial profile was discarded. And the second requested profile
would not contain any data for the time before the JSContext went away.
- We now do less work when a thread's JSContext goes away. This should
decrease the interruption time.
MozReview-Commit-ID: 3KhnPtBijna
--HG--
extra : rebase_source : 2ef5ac933e4db1c98526a2b36147ff031893de9e
extra : intermediate-source : d63b04327077d1ef55f509b365cd2693905b0733
extra : source : f2d8c993aa2c16bc491c55179d545f5a2c727391
In an upcoming patch we'll want to initialize mUniqueStrings by stealing
another object's UniqueJSONStrings, but UniqueJSONStrings itself is not
move-constructible. But UniquePtr is.
Making UniqueJSONStrings itself move-constructible would be a bit tricky
because it has a SpliceableChunkedJSONWriter which is not move-constructible;
and making SpliceableChunkedJSONWriter move-constructible is hard because
there's no obvious "empty but valid" state that we could leave a moved-out-of
SpliceableChunkedJSONWriter in; for example, it expects to have a non-null
WriteFunc at all times.
MozReview-Commit-ID: Q6o61HFTiD
--HG--
extra : rebase_source : e1073be9892cf7cfd6ca4f2562ce939690b3b4d7
This also renames FlushSamplesAndMarkers to NotifyAboutToLoseJSContext.
MozReview-Commit-ID: FWinMi85yDZ
--HG--
extra : rebase_source : 6d8bfd6937ce757108f80f43e878a2dbead318bd
This makes it clear which combinations of fields are possible.
MozReview-Commit-ID: C3PriO7nWsJ
--HG--
extra : rebase_source : 68df01f11121b09b2f2762581dc28184262abfb8
I think this file was picking up such a declaration from a different file
already, through unified builds.
MozReview-Commit-ID: 9xTB2QA86U0
--HG--
extra : rebase_source : d7b614524ebdf25a185698b6632d6f925ce08da8
nsCString is the idiomatic string class we want to use anyway. There's no need
to think about std::string here.
MozReview-Commit-ID: 1rjZAyqp13d
--HG--
extra : rebase_source : 92c4eb22876c4fc89f00104c56f92a75053284e9
nsGenericHashKey never calls this operator, as far as I can tell.
MozReview-Commit-ID: NDybMI8DOA
--HG--
extra : rebase_source : 933c12e2ef4600ea33b6c7026f539e51447fc454
The file copies and renames make this patch look a bit confusing. Here's what
happens:
ThreadInfo.h:
Most of the code gets moved into RegisteredThread.h and ProfiledThreadData.h,
but a small piece remains in ThreadInfo.h.
ThreadInfo.cpp:
Gets split into RegisteredThread.cpp and ProfiledThreadData.cpp.
ThreadInfo.cpp itself goes away.
In the mercurial changeset, I've marked ThreadInfo.h as being copied to both
RegisteredThread.h and to ProfiledThreadData.h, and ThreadInfo.cpp as being
copied to RegisteredThread.cpp and as being renamed to ProfiledThreadData.cpp.
MozReview-Commit-ID: 1j1imAv9cTd
--HG--
rename : tools/profiler/core/ThreadInfo.cpp => tools/profiler/core/ProfiledThreadData.cpp
rename : tools/profiler/core/ThreadInfo.h => tools/profiler/core/ProfiledThreadData.h
rename : tools/profiler/core/ThreadInfo.cpp => tools/profiler/core/RegisteredThread.cpp
rename : tools/profiler/core/ThreadInfo.h => tools/profiler/core/RegisteredThread.h
extra : rebase_source : 91310691d5e46246ec03305511c1b86ab458b0b9
The overlay elements with children of editMenuOverlay.xul are moved into
include files (editMenuCommands.inc.xul and editMenuKeys.inc.xul). For
the other single elements in the overlay, the attributes are inlined
wherever they are used.
MozReview-Commit-ID: 792cuzUvQxT
--HG--
extra : rebase_source : 58e4c05bde16cee873d37c6198de102d048499c2
As of Bug 1425463 it's available in all contexts (including JSM). The following
patche is going to remove imports to Console.jsm, so prepare for this by allowing
it to be used as a global in eslint.
MozReview-Commit-ID: 3gCIspnlVgB
--HG--
extra : rebase_source : 6da75d42d7d937b628ef1d9c0d4e349fd76eda36
Virtual function declarations should specify only one of `virtual`, `final`, or `override`, as per the Mozilla C++ style guide:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
This lint warns about:
virtual void Bad1() final
void Bad2() final override
void Bad3() override final
Caveats: This lint doesn't warn about `virtual void NotBad() override` at this time because there are 8000+ instances. It also doesn't warn about function declarations that span multiple lines because the regex can't match across line breaks.
MozReview-Commit-ID: LcBsOAKKgz7
--HG--
extra : rebase_source : 4da72ffac59acdc9796e3f540f24bb97af989cd0
The file copies and renames make this patch look a bit confusing. Here's what
happens:
ThreadInfo.h:
Most of the code gets moved into RegisteredThread.h and ProfiledThreadData.h,
but a small piece remains in ThreadInfo.h.
ThreadInfo.cpp:
Gets split into RegisteredThread.cpp and ProfiledThreadData.cpp.
ThreadInfo.cpp itself goes away.
In the mercurial changeset, I've marked ThreadInfo.h as being copied to both
RegisteredThread.h and to ProfiledThreadData.h, and ThreadInfo.cpp as being
copied to RegisteredThread.cpp and as being renamed to ProfiledThreadData.cpp.
MozReview-Commit-ID: 1j1imAv9cTd
--HG--
rename : tools/profiler/core/ThreadInfo.cpp => tools/profiler/core/ProfiledThreadData.cpp
rename : tools/profiler/core/ThreadInfo.h => tools/profiler/core/ProfiledThreadData.h
rename : tools/profiler/core/ThreadInfo.cpp => tools/profiler/core/RegisteredThread.cpp
rename : tools/profiler/core/ThreadInfo.h => tools/profiler/core/RegisteredThread.h
extra : rebase_source : 91310691d5e46246ec03305511c1b86ab458b0b9
The end goal here is to be able to use |mach try fuzzy <path>| with tests that
belong to a subsuite. To do this, we need a unique 'task_regex' value for each
subsuite so that we can map a test path back to a set of tasks.
This removes the TEST_FLAVORS dict (which was mostly just a redefinition of the
data in TEST_SUITES), and instead provides two new private mappings:
<flavor> -> suite definition
(<flavor>, <subsuite>) -> suite definition
To retrieve a suite definition given a flavor/subsuite, consumers can now call
get_suite_definition.
MozReview-Commit-ID: 2pe1v1IHUVy
--HG--
extra : rebase_source : 6fff947ba214112ccf16c894174a6a0e2487111a
This fixes a bug which can happen when the default version of python differs from
the version of python used with mach.
For example, mach explicitly looks for python2.7. This means running |mach lint -l flake8|
should also run flake8 with version 2.7. But if the default is python3, and flake8 is also
installed there, the subprocess call that invokes flake8 will run under python3. This can
lead to errors like "undefined name 'basestring'" and other 2to3 gotchas.
This patch ensures that we run the flake8 binary (and the pip for installing flake8) from
the same interpreter as mach, no matter the system default.
MozReview-Commit-ID: HSuMzDsAvsW
--HG--
extra : rebase_source : faf4c8c0eb6f46d8b50c2d9be9aa6f6d47e4e0cb
This resolves the bug where we attempted to find information about JitReturnAddr
entries which were collected with a new JSContext by asking an old JSContext.
MozReview-Commit-ID: FQrnAuwwzHU
--HG--
extra : rebase_source : d0a0c7077199dc177123bb54951f4f7238c5eaf6
This makes the JSON serialization code for optimization type info a little
easier to read.
MozReview-Commit-ID: 2auHVmp7hKw
--HG--
extra : rebase_source : 1fbcf4dc63a24822f5411a7107af0e07a703a4bf
This moves the meat of the processing from operator() into the lambda, so that
it can be read in the function that calls forEachOptimizationAttempt. Now the
person who wants to understand this code hopefully won't need to scroll up and
down as much.
MozReview-Commit-ID: H9zRf1Vbswg
--HG--
extra : rebase_source : a742fa4c076437c7af6837280f725ee4532cbf2c
This may seem like an unnecessary increase in complexity, and it probably is.
But it makes it easier to reason about lifetimes if your mind is accustomed to
Rust, which would enforce a similar solution.
MozReview-Commit-ID: kJZifbjCSU
--HG--
extra : rebase_source : a2906eb296975ca689c2c3a019c33062ba17b0f2
WriteSamples doesn't really need the ability to write strings, but always passing
a string table means that there's one less thing to worry about (one less piece of
unsafe API).
MozReview-Commit-ID: 386OEibyush
--HG--
extra : rebase_source : 4fa6428b6371cf4c3db5ad77aac06c0113b2e541
I wasn't comfortable with how Stack had a reference to the UniqueStacks object.
Now we compute new the new stack index after appending a frame by explicitly
calling a method of the UniqueStacks object.
MozReview-Commit-ID: KQAI9JNb4ag
--HG--
extra : rebase_source : 5d4c7a3f637f8e2bbd4e84c3aca65290a731a206
This also renames ForEachProfiledFrameOp::FrameHandle to ProfiledFrameHandle.
MozReview-Commit-ID: 7Jh1x2QWjXe
--HG--
extra : rebase_source : 8bb0fa15fa20215f03148cfd30ae0e41f82330fd
Previously we weren't explicitly installing sphinx. Instead, the 'sphinx-js'
package had a dependency on 'sphinx<2.0'. This caused errors when sphinx
released their backwards incompatible version 1.7.
This patch pins sphinx==1.6.7 and adds all other dependencies to the same
requirements.txt (with hashes).
Upgrading to sphinx==1.7 will happen in a follow-up.
MozReview-Commit-ID: 28fKI7T4vfa
--HG--
extra : rebase_source : a9f276586ed08f49c1a26088aae88c363a31c167
This gets the pseudostack from the JSContext instead of using TLS, and only
pushes a pseudo stack frame if the profiler is active.
MozReview-Commit-ID: IzT4py9H8su
--HG--
extra : rebase_source : 9962455d59e3f8b85a347f4203ac619e654fcb7c
extra : source : f15e6874f6c14f7a5e5b0cb63acd0a95ad34db4e
This patch makes a few changes around error handling:
1) Prints the name of the linter that produced non-json output
2) Changes the 'python not found' error to a warning (as this is not fatal)
3) Makes sure said warning only gets printed once (by moving it to the setup function)
MozReview-Commit-ID: Dkq7CulTs91
--HG--
extra : rebase_source : 5d4bd32a62264a88520c09420f5acd90edcdc740
As the eslintvalidate linters haven't been doing anything but printing
an error message for a month, this is just cleanup.
MozReview-Commit-ID: 5dhrSmEv0Gi
--HG--
extra : rebase_source : 30e588f47a69b152f72d29e6aaab7efbd59fbf09
This fixes a bug which can happen when the default version of python differs from
the version of python used with mach.
For example, mach explicitly looks for python2.7. This means running |mach lint -l flake8|
should also run flake8 with version 2.7. But if the default is python3, and flake8 is also
installed there, the subprocess call that invokes flake8 will run under python3. This can
lead to errors like "undefined name 'basestring'" and other 2to3 gotchas.
This patch ensures that we run:
python2.7 -m flake8
which explicitly runs flake8 against the same interpreter as mach, no matter the default.
MozReview-Commit-ID: HSuMzDsAvsW
--HG--
extra : rebase_source : d39f97ed0f82f4d2c81f044ef1f7dad0953a3d8d
We extract some common framework to run profiler tests.
MozReview-Commit-ID: 7FPcH1NpJ7S
--HG--
extra : rebase_source : a487cb34c50889112eaecc8a20553365cfb70cfa
In this patch we also expose a script's compartment in jsfriendapi.h
MozReview-Commit-ID: LgoN8ANLgxI
--HG--
extra : rebase_source : a9a29e538041ac574b6b44fab166a7838fce54ac
Also, remove a now-obsolete comment from placesOverlay.xul and remove
some now-empty XPCShell test head files.
MozReview-Commit-ID: 6kKVQu8FAL3
--HG--
extra : rebase_source : 7dd05818d68a15bd170af734078db4ba45029d80
This patch was autogenerated by my decomponents.py
It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.
It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.
It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)
MozReview-Commit-ID: DeSHcClQ7cG
--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
We extract some common framework to run profiler tests.
MozReview-Commit-ID: 7ct5RMhwmOe
--HG--
extra : rebase_source : 01165c506a4325310c23c9be6de2f5e6f958cf00
In this patch we also expose a script's compartment in jsfriendapi.h
MozReview-Commit-ID: JGTLygZ6DK5
--HG--
extra : rebase_source : 585edbdbc74044f2d644f5046513786ee4f42a2f
This allows linters to define a 'setup' method which will automatically be
called by |mach lint| before running the linter. Users can also explicitly run
these methods (without doing any actual linting) by running |mach lint --setup|.
MozReview-Commit-ID: 74aY1pfsaX1
--HG--
extra : rebase_source : e6a7d769ba14c996c7a77316928063fa46358c5a
This is ancient and the team that used it (gfx) is no longer using it.
MozReview-Commit-ID: HrDgmAU9QeW
--HG--
extra : rebase_source : c4a64965c4ae1a50888893e881a6e8a9688a58b6
This is a new issue that gets linted with flake8 3.5.0. Basically you should
never use a blank except: statement.
This will catch all exceptions, including KeyboardInterrupt and SystemExit
(which is likely not intended). If a catch all is needed, use
`except: Exception`. If you *really* mean to also catch KeyboardInterrupt et
al, use `except: BaseException`.
Of course, being specific is often better than a catch all.
MozReview-Commit-ID: FKx80MLO4RN
--HG--
extra : rebase_source : 7c74a7d0d81f2c984b47aff3a0ee3448b791177b
The flake8 linter requires a specific version of flake8, so that running it
locally vs in CI vs in mozreview will all produce the same results.
Allowing consumers to specify a custom flake8 binary via the FLAKE8 environment
variable, subverts that goal and can result in unexplained errors showing up in
some configurations but not others.
MozReview-Commit-ID: 1s0nC8ZO6Qi
--HG--
extra : rebase_source : f3913e2bce7770edf8deba18890f063975ca0844
Modern NDK headers all have <link.h>, so we should always include it,
and still provide shims for anything we need that's not defined in
<link.h>.
MozReview-Commit-ID: GNBDIe73RFm
--HG--
extra : rebase_source : 1246dce8a7ad201cf4f01de8e4912217636f1fc8
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
This adds support for detecting globals created by these helpers, as well as a
rule to enforce their use over the older XPConnect variants.
The latter rule also supports fixing code to use the newer variants, and will
be used in the next part to rewrite in-tree ESLint-enabled code that fails it.
MozReview-Commit-ID: 6Bgo6ohQA5j
--HG--
extra : source : fbef09c3e8af1653f270db589f73f2786c23ddc2
extra : intermediate-source : e2674287e57fbf6835729f42b8491359c2c4bfd5
We don't support Android for Gecko Profiler extension yet.
So for investigating arm issue, I would like to add initial support of
Gecko Profiler for Linux/arm.
--HG--
extra : rebase_source : f936a97a87b7eea2ebfefe3cbc7f8791bc90d03a
Modern NDK headers all have <link.h>, so we should always include it,
and still provide shims for anything we need that's not defined in
<link.h>.
MozReview-Commit-ID: GNBDIe73RFm
--HG--
extra : rebase_source : f1f2eddc73dc1accb3a1eb8445600b015e9e7d52
This is a bustage fix that needs to get out quickly. Once landed we can take
the time to enable it on more directories, or preferably change it to a
blacklist.
MozReview-Commit-ID: Gbf7q2L0tg3
--HG--
extra : rebase_source : a58ae64c655b24e686710a663d4538b4cfe020f7
This patch adds a new bookmarks engine, pref'd off, that writes to the
buffer instead of Places.
MozReview-Commit-ID: 7idBa03kOzm
--HG--
extra : rebase_source : 671ebeb3de824dc43c0ef14b2dfe065a33e2911a
The mirror matches the complete bookmark tree stored on the Sync
server, stores new bookmarks changed on the server since the last
sync, merges the local and remote trees, applies the resulting merged
tree back to Places, fires observer notifications for all items changed
in the merge, and stages locally changed bookmarks for upload.
MozReview-Commit-ID: MbeFQUargt
--HG--
extra : rebase_source : b635fd65ef10ab9ce3a2f9af2e527d342a790f6e
When the Gecko Profiler runs, we keep samples and markers for threads in
some occasions (eg when a Worker ends). But we fail to account for the
case where these threads have output no sample and no marker yet.
MozReview-Commit-ID: 2IEghD0v5Qd
--HG--
extra : rebase_source : b1af41c2d24b92c278922940151093f8b7d197db
This adds support for detecting globals created by these helpers, as well as a
rule to enforce their use over the older XPConnect variants.
The latter rule also supports fixing code to use the newer variants, and will
be used in the next part to rewrite in-tree ESLint-enabled code that fails it.
MozReview-Commit-ID: 6Bgo6ohQA5j
--HG--
extra : rebase_source : feca0a0ed339420ea19faa1f6614e6253f0c840e
extra : absorb_source : d32d3d23fbd2c7dcae082375a1f9a61766b04b75
extra : histedit_source : 83cebb4f3eb66a79d38ee5412a5739d0c603425b
This patch adjusts tools/fuzzing/ in such a way that the relevant parts can be
reused in the JS engine. Changes in detail include:
* Various JS_STANDALONE checks to exclude parts that cannot be included in
those builds.
* Turn LibFuzzerRegistry and LibFuzzerRunner into generic FuzzerRegistry and
FuzzerRunner classes and use them for AFL as well. Previously, AFL was
piggy-backing on gtests which was kind of an ugly solution anyway (besides
that it can't work in JS). Now more code like registry and harness is
shared between the two and they follow almost the same call paths and entry
points. AFL macros in FuzzingInterface have been rewritten accordingly.
This also required name changes in various places. Furthermore, this unifies
the way, the fuzzing target is selected, using the FUZZER environment
variable rather than LIBFUZZER (using LIBFUZZER in browser builds will give
you a deprecation warning because I know some people are using this already
and need time to switch). Previously, AFL target had to be selected using
GTEST_FILTER, so this is also much better now.
* I had to split up FuzzingInterface* such that the STREAM parts are in a
separate set of files FuzzingInterfaceStream* because they use nsStringStream
which is not allowed to be included into the JS engine even in a full browser
build (error: "Using XPCOM strings is limited to code linked into libxul.").
I also had to pull FuzzingInterface.cpp (the RAW part only) into the header
and make it static because otherwise, would have to make not only separate
files but also separate libraries to statically link to the JS engine, which
seemed overkill for a single small function. The streaming equivalent of the
function is still in a cpp file.
* LibFuzzerRegister functions are now unique by appending the module name to
avoid redefinition errors.
MozReview-Commit-ID: 44zWCdglnHr
--HG--
extra : rebase_source : fe07c557032fd33257eb701190becfaf85ab79d0
This patch adjusts tools/fuzzing/ in such a way that the relevant parts can be
reused in the JS engine. Changes in detail include:
* Various JS_STANDALONE checks to exclude parts that cannot be included in
those builds.
* Turn LibFuzzerRegistry and LibFuzzerRunner into generic FuzzerRegistry and
FuzzerRunner classes and use them for AFL as well. Previously, AFL was
piggy-backing on gtests which was kind of an ugly solution anyway (besides
that it can't work in JS). Now more code like registry and harness is
shared between the two and they follow almost the same call paths and entry
points. AFL macros in FuzzingInterface have been rewritten accordingly.
This also required name changes in various places. Furthermore, this unifies
the way, the fuzzing target is selected, using the FUZZER environment
variable rather than LIBFUZZER (using LIBFUZZER in browser builds will give
you a deprecation warning because I know some people are using this already
and need time to switch). Previously, AFL target had to be selected using
GTEST_FILTER, so this is also much better now.
* I had to split up FuzzingInterface* such that the STREAM parts are in a
separate set of files FuzzingInterfaceStream* because they use nsStringStream
which is not allowed to be included into the JS engine even in a full browser
build (error: "Using XPCOM strings is limited to code linked into libxul.").
I also had to pull FuzzingInterface.cpp (the RAW part only) into the header
and make it static because otherwise, would have to make not only separate
files but also separate libraries to statically link to the JS engine, which
seemed overkill for a single small function. The streaming equivalent of the
function is still in a cpp file.
* LibFuzzerRegister functions are now unique by appending the module name to
avoid redefinition errors.
MozReview-Commit-ID: 44zWCdglnHr
--HG--
rename : tools/fuzzing/libfuzzer/harness/LibFuzzerRunner.cpp => tools/fuzzing/interface/harness/FuzzerRunner.cpp
rename : tools/fuzzing/libfuzzer/harness/LibFuzzerRunner.h => tools/fuzzing/interface/harness/FuzzerRunner.h
rename : tools/fuzzing/libfuzzer/harness/LibFuzzerTestHarness.h => tools/fuzzing/interface/harness/FuzzerTestHarness.h
rename : tools/fuzzing/libfuzzer/harness/moz.build => tools/fuzzing/interface/harness/moz.build
rename : tools/fuzzing/libfuzzer/harness/LibFuzzerRegistry.cpp => tools/fuzzing/registry/FuzzerRegistry.cpp
rename : tools/fuzzing/libfuzzer/harness/LibFuzzerRegistry.h => tools/fuzzing/registry/FuzzerRegistry.h
extra : rebase_source : 7d0511ca0591dbf4d099376011402e063a79ee3b
This marks **/docs/** as exclusively docs, and code that is autodoc'd as
inclusively docs.
That means that a change that purely modifies documentation files will *only*
run `docs` tasks, while a change that modifies autodoc'd source code will
*additionaly* run `docs` tasks. The tasks do not run by default.
MozReview-Commit-ID: G9tOK0AwtrI
--HG--
extra : rebase_source : 8dd971e5c9b0eb5f47895664a4ea49442f303ecb
extra : source : 0881de9b2b5e36ec37cc866f1d4af109da57a919
This enables the syntax like:
./mach try fuzzy dom/indexedDB
This will open up the fzf interface like normal, except only tasks
that have tests under dom/indexedDB will be selectable (and there
will only be one chunk per configuration).
This can be combined with -q/--query like normal:
./mach try fuzzy dom/indexedDB -q "!pgo !cov !asan"
When the tasks get scheduled, only the tests under the specified
path(s) will run within the harness.
MozReview-Commit-ID: IHRXXi5mB4G
--HG--
extra : rebase_source : 8a89f255591e6dfa31b1420196c4698f2015d10c
This simply groups arguments related to generating the list of
tasks from taskgraph into their own argument group.
MozReview-Commit-ID: IHRXXi5mB4G
--HG--
extra : rebase_source : 6c746f0cb8d93f957f50ba12f77d63edb04b6d1e
This sets the MOZHARNESS_TEST_PATHS environment variables for all tasks.
When specifying paths, this will cause many test tasks to only run the
tests under that directory as opposed to the normal default.
MozReview-Commit-ID: IHRXXi5mB4G
--HG--
extra : rebase_source : e7132311641f4d36a5bff56424988fbb3ae87238