DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
# DOM Bindings Configuration.
#
# The WebIDL interfaces are defined in dom/webidl. For each such interface, there
# is a corresponding entry in the configuration table below. The configuration
# table maps each interface name to a |descriptor| or list of |descriptor|s.
#
# Valid fields for all descriptors:
#   * nativeType - The native type (concrete class or XPCOM interface) that
#                  instances of this interface will unwrap to (required).
#   * headerFile - The file in which the nativeType is declared (defaults
#                  to an educated guess).
#   * castable - Indicates whether the value in the wrapper can be cast to
#                nativeType, or whether it needs to be QI-ed (defaults to True
#                for everything but callback interfaces).
#   * concrete - Indicates whether there exist objects with this interface as
#                their primary interface (defaults to True).
#   * prefable - Indicates whether this binding is subject to the about:config
#                pref, or whether it's always enabled (defaults to False).
#   * workers - Indicates whether the descriptor is intended to be used for
#               worker threads (defaults to false).
#   * customTrace - The native class will use a custom trace hook (defaults to
#                   true for workers, false otherwise).
#   * customFinalize - The native class will use a custom finalize hook
#                      (defaults to true for workers, false otherwise).
#   * notflattened - The native type does not have nsIClassInfo, so when
#                    wrapping it the right IID needs to be passed in.
#
#   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
#
#   * infallible - attributes and methods specified in the .webidl file that
#                  cannot fail and therefore do not require the final nsresult&
#                  argument
#   * implicitJSContext - attributes and methods specified in the .webidl file
#                         that require a JSContext as the first argument
#   * resultNotAddRefed - attributes and methods specified in the .webidl file
#                         that do not AddRef the return value

DOMInterfaces = {

'XMLHttpRequest': [
{
    'nativeType': 'nsXMLHttpRequest',
    'prefable': True,
    'infallible': {
        'all': [
            'readyState', 'withCredentials', 'abort', 'statusText',
            'getAllResponseHeaders', 'overrideMimeType', 'mozBackgroundRequest',
            'multipart', 'channel', 'upload', 'status'
        ],
        'getterOnly': [
            'responseType', 'timeout', 'onreadystatechange', 'onuploadprogress'
        ]
    },
    'implicitJSContext': {
        'all': [
            'response', 'getInterface', 'send', 'sendAsBinary'
        ],
        'setterOnly': [
            'onreadystatechange', 'onuploadprogress'
        ]
    },
    'resultNotAddRefed': [ 'upload', 'responseXML' ]
},
{
    'workers': True,
    'nativeType': 'mozilla::dom::workers::XMLHttpRequest',
    'headerFile': 'mozilla/dom/workers/bindings/XMLHttpRequest.h',
    'infallible': [
        'readyState', 'statusText'
    ]
}],

'XMLHttpRequestUpload': [
{
    'nativeType': 'nsXMLHttpRequestUpload',
    'headerFile': 'nsXMLHttpRequest.h',
    'prefable': True
},
{
    'workers': True,
    'nativeType': 'mozilla::dom::workers::XMLHttpRequestUpload',
    'headerFile': 'mozilla/dom/workers/bindings/XMLHttpRequestUpload.h'
}],

'MozChannel': [
{
    'nativeType': 'nsIChannel',
    'prefable': True,
    'castable': False,
    'notflattened': True
},
{
    'workers': True,
    'nativeType': 'JSObject',
    'headerFile': 'jsapi.h',
    'castable': False
}],

'InputStream': [
{
    'nativeType': 'nsIInputStream',
    'prefable': True,
    'castable': False,
    'notflattened': True
},
{
    'workers': True,
    'nativeType': 'JSObject',
    'headerFile': 'jsapi.h',
    'castable': False
}],

'Document': [
{
    'nativeType': 'nsIDocument',
    'prefable': True,
    'castable': False
},
{
    'workers': True,
    'nativeType': 'JSObject',
    'headerFile': 'jsapi.h',
    'castable': False
}],

'Blob': [
{
    'nativeType': 'nsIDOMBlob',
    'headerFile': 'nsIDOMFile.h',
    'prefable': True,
    'castable': False
},
{
    'workers': True,
    'nativeType': 'JSObject',
    'headerFile': 'jsapi.h',
    'castable': False
}],

'FormData': [
{
    'nativeType': 'nsIDOMFormData',
    'prefable': True,
    'castable': False
},
{
    'workers': True,
    'nativeType': 'JSObject',
    'headerFile': 'jsapi.h',
    'castable': False
}],

'EventTarget': [
{
    'nativeType': 'nsDOMEventTargetHelper',
    'hasInstanceInterface': 'nsIDOMEventTarget',
    'concrete': False,
    'prefable': True,
},
{
    'workers': True,
    'nativeType': 'mozilla::dom::workers::EventTarget',
    'headerFile': 'mozilla/dom/workers/bindings/EventTarget.h',
    'concrete': False
}],

'Event': [
{
    'nativeType': 'nsIDOMEvent',
    'prefable': True,
    'castable': False
},
{
    'workers': True,
    'nativeType': 'JSObject',
    'headerFile': 'jsapi.h',
    'castable': False
}],

'EventListener': [
{
    'nativeType': 'nsIDOMEventListener',
    'prefable': True
},
{
    'workers': True,
    'nativeType': 'JSObject',
    'headerFile': 'jsapi.h'
}],

'XMLHttpRequestEventTarget': [
{
    'nativeType': 'nsXHREventTarget',
    'headerFile': 'nsXMLHttpRequest.h',
    'concrete': False,
    'prefable': True,
    'infallible': {
        'getterOnly': [
            'onabort', 'onerror', 'onload', 'onloadstart', 'onprogress',
            'ontimeout', 'onloadend'
        ]
    },
    'implicitJSContext': {
        'setterOnly': [
            'onabort', 'onerror', 'onload', 'onloadstart', 'onprogress',
            'ontimeout', 'onloadend'
        ]
    }
},
{
    'workers': True,
    'concrete': False,
    'nativeType': 'mozilla::dom::workers::XMLHttpRequestEventTarget',
    'headerFile': 'mozilla/dom/workers/bindings/XMLHttpRequestEventTarget.h'
}],

'IID': [
{
    'nativeType': 'nsIJSIID',
    'headerFile': 'xpcjsid.h',
    'prefable': True,
    'castable': False
},
{
    'workers': True,
    'nativeType': 'JSObject',
    'headerFile': 'jsapi.h',
    'castable': False
}],

}