Bug 1394694 (part 2) - Mark nsIAtom-using methods in nsIXUL*.idl as [noscript]. r=janv.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 05 Sep 2017 08:36:21 +1000
changeset 428616 33e34e8290927b41a59cf66ab9fac3150283236e
parent 428615 b191c933df2076747864be07b8e7fc402a54a687
child 428617 4e6c69e3227cf6132792b3725531155d9c53adad
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanv
bugs1394694
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1394694 (part 2) - Mark nsIAtom-using methods in nsIXUL*.idl as [noscript]. r=janv.
dom/xul/templates/nsIXULTemplateBuilder.idl
dom/xul/templates/nsIXULTemplateQueryProcessor.idl
dom/xul/templates/nsIXULTemplateResult.idl
--- a/dom/xul/templates/nsIXULTemplateBuilder.idl
+++ b/dom/xul/templates/nsIXULTemplateBuilder.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 4; 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 http://mozilla.org/MPL/2.0/. */
 
 #include "domstubs.idl"
 
-interface nsIAtom;
+interface nsIAtom;  // used in [noscript] methods only
 interface nsIContent;
 interface nsIXULBuilderListener;
 interface nsIXULTemplateResult;
 interface nsIXULTemplateRuleFilter;
 interface nsIXULTemplateQueryProcessor;
 interface nsIRDFResource;
 interface nsIRDFCompositeDataSource;
 interface nsIDOMDataTransfer;
@@ -262,17 +262,18 @@ interface nsIXULTemplateBuilder : nsISup
      * Returns true if the node has content generated for it. This method is
      * intended to be called only by the RDF query processor. If aTag is set,
      * the content must have a tag name that matches aTag. aTag may be ignored
      * for builders that don't generate real DOM content.
      *
      * @param aNode node to check
      * @param aTag tag that must match
      */
-    boolean hasGeneratedContent(in nsIRDFResource aNode, in nsIAtom aTag);
+    [noscript] boolean hasGeneratedContent(in nsIRDFResource aNode,
+                                           in nsIAtom aTag);
 
     /**
      * Adds a rule filter for a given rule, which may be used for specialized
      * rule filtering. Any existing filter on the rule is removed. The default
      * conditions specified inside the <rule> tag are applied before the
      * rule filter is applied, meaning that the filter may be used to further
      * filter out results but not reaccept results that have already been
      * rejected.
--- a/dom/xul/templates/nsIXULTemplateQueryProcessor.idl
+++ b/dom/xul/templates/nsIXULTemplateQueryProcessor.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; 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 http://mozilla.org/MPL/2.0/. */
 
 #include "domstubs.idl"
 
-interface nsIAtom;
+interface nsIAtom;  // used in [noscript] methods only
 interface nsIArray;
 interface nsISimpleEnumerator;
 interface nsIXULTemplateResult;
 interface nsIXULTemplateRuleFilter;
 interface nsIXULTemplateBuilder;
 
 /**
  * A query processor takes a template query and generates results for it given
@@ -157,20 +157,20 @@ interface nsIXULTemplateQueryProcessor :
    *
    * @param aBuilder the template builder
    * @param aQuery <query> node to compile
    * @param aRefVariable the reference variable
    * @param aMemberVariable the member variable
    *
    * @returns a compiled query object
    */
-  nsISupports compileQuery(in nsIXULTemplateBuilder aBuilder,
-                           in nsIDOMNode aQuery,
-                           in nsIAtom aRefVariable,
-                           in nsIAtom aMemberVariable);
+  [noscript] nsISupports compileQuery(in nsIXULTemplateBuilder aBuilder,
+                                      in nsIDOMNode aQuery,
+                                      in nsIAtom aRefVariable,
+                                      in nsIAtom aMemberVariable);
 
   /**
    * Generate the results of a query and return them in an enumerator. The
    * enumerator must contain nsIXULTemplateResult objects. If there are no
    * results, an empty enumerator must be returned.
    *
    * The datasource will be the same as the one passed to the earlier
    * initializeForBuilding method. The context reference (aRef) is a reference
@@ -217,20 +217,20 @@ interface nsIXULTemplateQueryProcessor :
    * of the variable aVar would be 7, assuming the query processor considers
    * the syntax '+2' to mean add two to the reference.
    *
    * @param aRuleNode rule to add the binding to
    * @param aVar variable that will be bound
    * @param aRef variable that holds reference value
    * @param aExpr expression used to compute the value to assign
    */
-  void addBinding(in nsIDOMNode aRuleNode,
-                  in nsIAtom aVar,
-                  in nsIAtom aRef,
-                  in AString aExpr);
+  [noscript] void addBinding(in nsIDOMNode aRuleNode,
+                             in nsIAtom aVar,
+                             in nsIAtom aRef,
+                             in AString aExpr);
 
   /**
    * Translate a ref attribute string into a result. This is used as the
    * reference point by the template builder when generating the first level
    * of content. For recursive generation, the result from the parent
    * generation phase will be used directly as the reference so a translation
    * is not needed. This allows all levels to be generated using objects that
    * all implement the nsIXULTemplateResult interface.
@@ -264,13 +264,13 @@ interface nsIXULTemplateQueryProcessor :
    * query processor.
    *
    * @param aLeft the left result to compare
    * @param aRight the right result to compare
    * @param aVar variable to compare
    *
    * @param returns -1 if less, 0 if equal, or 1 if greater
    */
-   int32_t compareResults(in nsIXULTemplateResult aLeft,
-                          in nsIXULTemplateResult aRight,
-                          in nsIAtom aVar,
-                          in unsigned long aSortHints);
+   [noscript] int32_t compareResults(in nsIXULTemplateResult aLeft,
+                                     in nsIXULTemplateResult aRight,
+                                     in nsIAtom aVar,
+                                     in unsigned long aSortHints);
 };
--- a/dom/xul/templates/nsIXULTemplateResult.idl
+++ b/dom/xul/templates/nsIXULTemplateResult.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; 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 http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
-interface nsIAtom;
+interface nsIAtom;  // used in [noscript] methods only
 interface nsIDOMNode;
 interface nsIRDFResource;
 
 /**
  * A single result generated from a template query. Each result is identified
  * by an id, which must be unique within the set of results produced from a
  * query. The result may optionally be identified by an RDF resource.
  *
@@ -75,30 +75,30 @@ interface nsIXULTemplateResult : nsISupp
    * attribute within the action body, it will be replaced with the result
    * of this method. The question mark is considered part of the variable
    * name, thus aVar should be ?name and not simply name.
    *
    * @param aVar the variable to look up
    *
    * @return the value for the variable or a null string if it has no value
    */
-  AString getBindingFor(in nsIAtom aVar);
+  [noscript] AString getBindingFor(in nsIAtom aVar);
 
   /**
    * Get an object value for a variable such as ?name for this result. 
    *
    * This method may return null for a variable, even if getBindingFor returns
    * a non-null value for the same variable. This method is provided as a
    * convenience when sorting results.
    *
    * @param aVar the variable to look up
    *
    * @return the value for the variable or null if it has no value
    */
-  nsISupports getBindingObjectFor(in nsIAtom aVar);
+  [noscript] nsISupports getBindingObjectFor(in nsIAtom aVar);
 
   /**
    * Indicate that a particular rule of a query has matched and that output
    * will be generated for it. Both the query as compiled by the query
    * processor's compileQuery method and the XUL <rule> element are supplied.
    * The query must always be one that was compiled by the query processor
    * that created this result. The <rule> element must always be a child of
    * the <query> element that was used to compile the query.