author Iain Ireland <>
Fri, 11 Jan 2019 18:05:36 +0000
changeset 453523 025feea5945bffc625e9cca2e23be51ee8670315
parent 389170 c78fdb7724524585387b43ef958a17408827dcfa
permissions -rw-r--r--
Bug 1480390: Move ForOfIterClose logic inside TryNoteIter r=tcampbell This patch was intended to be a pure refactoring of existing code with no side-effects, moving the logic for handling for-of/for-of-iterclose trynotes inside TryNoteIter to avoid duplicating logic in all users of TryNoteIter. However, it turns out that there was a subtle preexisting bug in TryNoteIter that is fixed by the refactoring. Specifically, the logic to skip from a for-of-iterclose to its enclosing for-of must run before the logic to skip trynotes based on stack depth. Otherwise, the stack depth code may filter out the enclosing for-of (see the attached test case for an example) and we will skip too many try-notes. Differential Revision:

.. _mozconfig:

mozconfig Files

mozconfig files are used to configure how a build works.

mozconfig files are actually shell scripts. They are executed in a
special context with specific variables and functions exposed to them.



The following special functions are available to a mozconfig script.


This function is used to declare extra options/arguments to pass into


    ac_add_options --disable-tests
    ac_add_options --enable-optimize


This function is used to inject statements into for execution.
It is typically used to define variables, notably the object directory.


    mk_add_options AUTOCLOBBER=1

Special mk_add_options Variables

For historical reasons, the method for communicating certain
well-defined variables is via mk_add_options(). In this section, we
document what those special variables are.


This variable is used to define the :term:`object directory` for the current

Finding the active mozconfig

Multiple mozconfig files can exist to provide different configuration
options for different tasks. The rules for finding the active mozconfig
are defined in the
:py:func:`mozbuild.mozconfig.MozconfigLoader.find_mozconfig` method:

.. autoclass:: mozbuild.mozconfig.MozconfigLoader
   :members: find_mozconfig