author Mike Shal <>
Thu, 24 Aug 2017 22:52:01 -0400
changeset 434519 cb773c661e0ca0bf297e977343076bef34411523
parent 426038 5a801710d5f2daa3cc19f1b13c37900b5a594b7c
child 462959 eb84081046c5e975cacbe1ee70462ee4c1c1114a
permissions -rw-r--r--
Bug 1402012 - Update to use PartialConfigEnvironment; r=glandium By using the PartialConfigEnvironment, the clients of buildconfig will depend on config.statusd/ files instead of config.status directly. Clients can access substs and defines using buildconfig.substs['FOO'] or buildconfig.defines['BAR'], and then collect file-level dependencies for make using buildconfig.get_dependencies(). All GENERATED_FILES rules already make use of this because automatically includes these dependencies (along with all python modules loaded). As a result of this commit, re-running configure will no longer cause the world to be rebuilt. Although config.status is updated, no build steps use config.status directly and instead depend on values in config.statusd/, which are written with FileAvoidWrite. Since those files are not official targets according to the make backend, make won't try to continually rebuild the backend when those files are out of date. And since they are FileAvoidWrite, make will only re-run dependent steps if the actual configure value has changed. As a result of using JSON to load data from the config.statusd directory, substs can be unicode (instead of a bare string type). converts the subst manually to a string so the value can be exported to the environment without issue on Windows. Additionally, patching the buildconfig.substs dict no longer works, so the test was modified to patch the underlying buildconfig.substs._dict instead. The other files that needed to be modified make use of all the defines for the preprocessor. Those that are used during 'mach build' now use buildconfig.defines['ALLDEFINES'], which maps to a special FileAvoidWrite file generated for the PartialConfigEnvironment. MozReview-Commit-ID: 2pJ4s3TVeS8

/* -*- Mode: IDL; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */

#include "nsISupports.idl"

interface nsIWebBrowserPersistDocumentReceiver;

 * Interface for objects which represent a document that can be
 * serialized with nsIWebBrowserPersist.  This interface is
 * asynchronous because the actual document can be in another process
 * (e.g., if this object is an nsFrameLoader for an out-of-process
 * frame).
 * Warning: this is currently implemented only by nsFrameLoader, and
 * may change in the future to become more frame-loader-specific or be
 * merged into nsIFrameLoader.  See bug 1101100 comment #34.
 * @see nsIWebBrowserPersistDocumentReceiver
 * @see nsIWebBrowserPersistDocument
 * @see nsIWebBrowserPersist
 * @param aOuterWindowID
 *        The outer window ID of the subframe we'd like to persist.
 *        If set at 0, nsIWebBrowserPersistable will attempt to persist
 *        the top-level document. If the outer window ID is for a subframe
 *        that does not exist, or is not held beneath the nsIWebBrowserPersistable,
 *        aRecv's onError method will be called with NS_ERROR_NO_CONTENT.
 * @param aRecv
 *        The nsIWebBrowserPersistDocumentReceiver is a callback that
 *        will be fired once the document is ready for persisting.
interface nsIWebBrowserPersistable : nsISupports
  void startPersistence(in unsigned long long aOuterWindowID,
                        in nsIWebBrowserPersistDocumentReceiver aRecv);