js/xpconnect/src/dom_quickstubs.qsconf

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/xpconnect/src/dom_quickstubs.qsconf	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,109 @@
     1.4 +# -*- Mode: Python -*-
     1.5 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 +
     1.9 +name = 'DOM'
    1.10 +
    1.11 +# A quick warning:
    1.12 +#
    1.13 +# Attributes or methods that call GetCurrentNativeCallContext must not be
    1.14 +# quick-stubbed, because quick stubs don't generate a native call context.
    1.15 +# qsgen.py has no way of knowing which attributes and methods do this, as it
    1.16 +# looks at interfaces, not implementations.  The symptoms, if you quick-stub
    1.17 +# one of those, can be really weird, because GetCurrentNativeCallContext
    1.18 +# doesn't crash--it may in fact return a plausible wrong answer.
    1.19 +
    1.20 +members = [ 
    1.21 +    # dom/interfaces/base
    1.22 +    #
    1.23 +    # Note that many implementations of interfaces in this directory
    1.24 +    # use GetCurrentNativeCallContext, notably:
    1.25 +    #   - nsIDOMLocation.reload
    1.26 +    #   - nsIDOMNSHistory.go
    1.27 +    #   - nsIDOMJSPluginArray.refresh
    1.28 +    #   - nsIDOMWindow.postMessage
    1.29 +    #   - nsIDOMJSWindow.{prompt,setTimeout,setInterval,open,openDialog}
    1.30 +    #
    1.31 +    # (And nsIDOMModalContentWindow.returnValue is an attribute of type
    1.32 +    # nsIVariant, which qsgen.py can't handle.)
    1.33 +    #
    1.34 +    # nsLocationSH has ~ALLOW_PROP_MODS_TO_PROTOTYPE, so don't try.
    1.35 +    #'nsIDOMLocation.hostname',
    1.36 +    #'nsIDOMLocation.href',
    1.37 +
    1.38 +    # dom/interfaces/storage
    1.39 +    'nsIDOMStorage.setItem',
    1.40 +    'nsIDOMStorage.length',
    1.41 +    'nsIDOMStorage.getItem',
    1.42 +    'nsIDOMStorage.key',
    1.43 +    'nsIDOMStorage.removeItem',
    1.44 +    'nsIDOMStorage.clear',
    1.45 +
    1.46 +    # dom/interfaces/xpath
    1.47 +    'nsIDOMXPathExpression.evaluate',
    1.48 +    'nsIDOMXPathNSResolver.lookupNamespaceURI',
    1.49 +    'nsIDOMXPathResult.snapshotItem',
    1.50 +    'nsIDOMXPathResult.iterateNext',
    1.51 +    'nsIDOMXPathResult.snapshotLength',
    1.52 +    'nsIDOMXPathResult.resultType',
    1.53 +    'nsIDOMXPathResult.numberValue',
    1.54 +    'nsIDOMXPathResult.stringValue',
    1.55 +    'nsIDOMXPathResult.booleanValue',
    1.56 +    'nsIDOMXPathResult.singleNodeValue',
    1.57 +    'nsIDOMNSXPathExpression.evaluateWithContext',
    1.58 +
    1.59 +    # layout/xul/base/public
    1.60 +    'nsIBoxObject.x',
    1.61 +    'nsIBoxObject.y',
    1.62 +    'nsIBoxObject.screenX',
    1.63 +    'nsIBoxObject.screenY',
    1.64 +    'nsIBoxObject.width',
    1.65 +    'nsIBoxObject.height',
    1.66 +
    1.67 +    # dom/indexedDB
    1.68 +    'nsIIndexedDatabaseManager.*',
    1.69 +
    1.70 +    # dom/quota
    1.71 +    'nsIQuotaManager.*',
    1.72 +    'nsIQuotaRequest.*',
    1.73 +    'nsIUsageCallback.*',
    1.74 +    ]
    1.75 +
    1.76 +# Most interfaces can be found by searching the includePath; to find
    1.77 +# nsIDOMEvent, for example, just look for nsIDOMEvent.idl.  But IDL filenames
    1.78 +# for very long interface names are slightly abbreviated, and many interfaces
    1.79 +# don't have their own files, just for extra wackiness.  So qsgen.py needs
    1.80 +# a little help.
    1.81 +#
    1.82 +irregularFilenames = {
    1.83 +    # stowaways
    1.84 +    'nsIDOMBlob': 'nsIDOMFile',
    1.85 +    'nsIIndexedDatabaseUsageCallback': 'nsIIndexedDatabaseManager',
    1.86 +    'nsITelephoneCallback': 'nsITelephone',
    1.87 +    }
    1.88 +
    1.89 +customIncludes = [
    1.90 +    'mozilla/dom/BindingUtils.h',
    1.91 +    'mozilla/dom/EventTargetBinding.h',
    1.92 +    'mozilla/dom/WindowBinding.h',
    1.93 +    ]
    1.94 +
    1.95 +nsIDOMStorage_Clear_customMethodCallCode = """
    1.96 +    rv = self->Clear();
    1.97 +    if (NS_SUCCEEDED(rv))
    1.98 +        JS_ClearNonGlobalObject(cx, obj);
    1.99 +"""
   1.100 +
   1.101 +customMethodCalls = {
   1.102 +    'nsIDOMStorage_Clear': {
   1.103 +        'code': nsIDOMStorage_Clear_customMethodCallCode
   1.104 +        },
   1.105 +    }
   1.106 +
   1.107 +newBindingProperties = {
   1.108 +    # Once the last entry here goes away, we can make the sNativePropertyHooks
   1.109 +    # of bindings static.
   1.110 +    'nsIDOMEventTarget': '&mozilla::dom::EventTargetBinding::sNativePropertyHooks->mNativeProperties',
   1.111 +    'nsIDOMWindow': '&mozilla::dom::WindowBinding::sNativePropertyHooks->mNativeProperties',
   1.112 +    }

mercurial