Bug 1257037 part 15. Get rid of the wantsXrays configuration annotation. Just set bindings to want Xrays if they're exposed in Window. r=khuey
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 08 Jul 2016 00:37:55 -0400
changeset 304184 a92d0eec5c91eb50116758bf14d05fde28bf788a
parent 304183 4082fdfd16fb2e87556f948bb09e3c3edfdd9fb1
child 304185 b8274835178599b7dfd55860f84406afb40bd673
push id30414
push usercbook@mozilla.com
push dateFri, 08 Jul 2016 09:59:01 +0000
treeherdermozilla-central@45682df2d2d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs1257037
milestone50.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 1257037 part 15. Get rid of the wantsXrays configuration annotation. Just set bindings to want Xrays if they're exposed in Window. r=khuey
dom/bindings/Bindings.conf
dom/bindings/Configuration.py
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -32,20 +32,16 @@
 #                   .webidl file and the values are the names as they should be
 #                   in the WebIDL.
 #   * wrapperCache: True if this object is a wrapper cache.  Objects that are
 #                   not can only be returned from a limited set of methods,
 #                   cannot be prefable, and must ensure that they disallow
 #                   XPConnect wrapping.  Always false for callback interfaces.
 #                   Defaults to true for non-callback descriptors.
 #
-# A descriptor can have 'wantsXrays': False specified if it
-# should not have Xray hooks generated.  Make sure to have someone
-# familiar with Xrays review any use of this!
-#
 # The following fields are either a string, an array (defaults to an empty
 # array) or a dictionary with three possible keys (all, getterOnly and
 # setterOnly) each having such an array as the value
 #
 #   * implicitJSContext - attributes and methods specified in the .webidl file
 #                         that require a JSContext as the first argument
 #
 # The value for an interface is a dictionary which specifies the
--- a/dom/bindings/Configuration.py
+++ b/dom/bindings/Configuration.py
@@ -274,17 +274,17 @@ class Descriptor(DescriptorProvider):
     """
     Represents a single descriptor for an interface. See Bindings.conf.
     """
     def __init__(self, config, interface, desc):
         DescriptorProvider.__init__(self)
         self.config = config
         self.interface = interface
 
-        self.wantsXrays = desc.get('wantsXrays', True)
+        self.wantsXrays = interface.isExposedInWindow()
 
         # Read the desc, and fill in the relevant defaults.
         ifaceName = self.interface.identifier.name
         # For generated iterator interfaces for other iterable interfaces, we
         # just use IterableIterator as the native type, templated on the
         # nativeType of the iterable interface. That way we can have a
         # templated implementation for all the duplicated iterator
         # functionality.