author Gregory Szorc <>
Tue, 07 Nov 2017 16:38:39 -0800
changeset 441455 b5f79b0f2a3586faf692c715b443264478e921c3
parent 372013 664f73663acba298c8451e1ea446d9af3120512a
permissions -rw-r--r--
Bug 1412932 - Switch to PGO build in; r=ted Previously, made the decision of whether to perform a PGO build. This required passing around MOZ_PGO and invoking a separate make target if this variable was set. In this commit, we move this logic to We employ a special mechanism in to override the default make target so `make` evaluates "profiledbuild" if MOZ_PGO is set. This also required using an explicit target for $(MAKE) invocations inside the "profiledbuild" rule to avoid infinite recursion. MozReview-Commit-ID: 8sHiVspMisM

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* 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 nsIFrameLoader;
interface nsIPartialSHistory;

 * nsIGroupedSHistory represent a combined session history across multiple
 * root docshells (usually browser tabs). The participating nsISHistory can
 * either be in chrome process or in content process, but nsIGroupedSHistory
 * itself lives in chrome process. The communication is proxyed through
 * nsIPartialSHistory.
[scriptable, builtinclass, uuid(813e498d-73a8-449a-be09-6187e62c5352)]
interface nsIGroupedSHistory : nsISupports
  // The total number of entries of all its partial session histories.
  [infallible] readonly attribute unsigned long count;

   * The currently active frameloader controlled by this nsIGroupedSHistory.
  readonly attribute nsIFrameLoader activeFrameLoader;

   * Remove all partial histories after currently active one (if any) and then
   * append the given partial session history to the end of the list.
  void appendPartialSHistory(in nsIPartialSHistory aPartialHistory);

   * Notify the grouped session history that the active partial session history
   * has been modified.
   * @param aPartialHistory The partial history which was updated
   * @param aTruncate If this parameter is true, all partial session histories
   *                  after this one will be removed.
  void handleSHistoryUpdate(in nsIPartialSHistory aPartialHistory, in boolean aTruncate);

   * Find the proper partial session history and navigate to the entry
   * corresponding to the given global index. Note it doesn't swap frameloaders,
   * but rather return the target loader for the caller to swap.
   * This function may throw NS_ERROR_NOT_AVAILABLE if the frameloader to swap
   * to is dead.
   * @param  aGlobalIndex
   *         The global index to navigate to.
   * @return The frameloader which needs to be swapped in, or null if no
   *         frameloader needs to be swapped.
  nsIFrameLoader gotoIndex(in unsigned long aGlobalIndex);

   * Close the FrameLoaderOwners of the inactive PartialSHistories in this GlobalSHistory.
   * This does not remove the PartialSHistories from the GroupedSHistory.
  void closeInactiveFrameLoaderOwners();

   * Add a partialSHistory as a "prerendering" partialSHistory. This
   * partialSHistory's tab will have its lifetime managed by the
   * GroupedSHistory, and will be closed when closeInactiveFrameLoaderOwners is
   * called, or whenever a SHistory update is received.
  void addPrerenderingPartialSHistory(in nsIPartialSHistory aPrerendering, in long aId);

   * Switch to the prerendering partialSHistory identified by aId, appending it after the current partialSHistory.
  [implicit_jscontext] nsISupports activatePrerendering(in long aId);

   * Cancel the prerendering with the given ID.
  void cancelPrerendering(in long aId);