User:Manuel Bucher
From MozillaWiki
I am a mozillian in the Necko-Team. I like improving docs when reading through them.
Resources to integrate somewhere into firefox-source-docs (or wiki)
My personal TODO-List for my outstanding documentation changes (where I don't have the time to do them immediately)/My non-trivially learned lessons about Firefox development:
- https://github.com/mystor/git-revise: Speed up builds (15s instead of 20min) after rebase (use
git revise
instead) when usinggit cinnebar
- my
.mozconfig
:
ac_add_options --enable-debug ac_add_options --enable-clang-plugin #ac_add_options --disable-unified-build ac_add_options --with-ccache=sccache ac_add_options CCACHE=/home/user/.mozbuild/sccache/sccache
- Setup distributed sccache following https://firefox-source-docs.mozilla.org/build/buildsystem/sccache-dist.html
- Bugzilla instant search. It's the same as duplicate search when entering bugs. Easier to find bugs with this search than the normal for me: https://bugzilla.mozilla.org/query.cgi?format=instant
- moz-phab can be used to download and checkout patches from phabricator using
moz-phab patch D000000
and replace D000000 with the patch-id from phabricator - Documentation of the test
.ini
files: https://firefox-source-docs.mozilla.org/build/buildsystem/test_manifests.html - Moz-config helper:
- Old error page dinosaur picture:
- Searchfox shows the Bugzilla component for files in the navigation box on the right side: https://searchfox.org/mozilla-central/source/netwerk/cache/nsCacheUtils.h
- mozregression
- https://moz-conduit.readthedocs.io/: Introduction to the set of systems involved in submitting code to mozilla-central.
- https://arewefastyet.com/
- Firefox language stats: https://4e6.github.io/firefox-lang-stats/
- (slightly outdated) nsresult integer -> error symbolic name lookup: https://james-ross.co.uk/mozilla/misc/nserror
- Also possible via searchfox: https://searchfox.org/mozilla-central/source/__GENERATED__/xpcom/base/error_list.rs
- Treeherder user guide
Fun code
- Interesting workaround to have a public constructor, but not really [1]
class WorkerThread { // Using this struct we restrict access to the constructor while still being // able to use MakeSafeRefPtr. struct ConstructorKey {}; public: explicit WorkerThread(ConstructorKey); }
- A long function name indicating that this function must not be called in non-test code[2]
/** * NOTE: This function is used only for testing! * * @param aDisable If true, disable all security check and make * hasMatchingOverride always return true. */ void setDisableAllSecurityChecksAndLetAttackersInterceptMyData(in boolean aDisable);
- parameter called
justKidding
on a function calledReal...
: https://searchfox.org/mozilla-central/search?q=justKidding&redirect=false
Good documentation comments
DocumentChannel is a protocol agnostic placeholder nsIChannel implementation that we use so that nsDocShell knows about a connecting load. It transfers all data into a DocumentLoadListener (running in the parent process), which will create the real channel for the connection, and decide which process to load the resulting document in. If the document is to be loaded in the current process, then we'll synthesize a redirect replacing this placeholder channel with the real one, otherwise the originating docshell will be removed during the process switch.
Will create the appropriate document channel: Either a DocumentChannelChild if called from the content process or a ParentProcessDocumentChannel if called from the parent process. This operation is infallible.
- Variant documentation: https://searchfox.org/mozilla-central/rev/ffa4d00965c5281def6d3ddcbcdf6259d38c9b9a/mfbt/Variant.h#364-568
- MozPromise documentation: https://searchfox.org/mozilla-central/rev/a64647a2125cf3d334451051491fef6772e8eb57/xpcom/threads/MozPromise.h#104-146
- ScopeExit documentation: https://searchfox.org/mozilla-central/rev/aa3ccd258b64abfd4c5ce56c1f512bc7f65b844c/mfbt/ScopeExit.h#13-80