Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 # -*- Mode: Python -*-
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 name = 'DOM'
8 # A quick warning:
9 #
10 # Attributes or methods that call GetCurrentNativeCallContext must not be
11 # quick-stubbed, because quick stubs don't generate a native call context.
12 # qsgen.py has no way of knowing which attributes and methods do this, as it
13 # looks at interfaces, not implementations. The symptoms, if you quick-stub
14 # one of those, can be really weird, because GetCurrentNativeCallContext
15 # doesn't crash--it may in fact return a plausible wrong answer.
17 members = [
18 # dom/interfaces/base
19 #
20 # Note that many implementations of interfaces in this directory
21 # use GetCurrentNativeCallContext, notably:
22 # - nsIDOMLocation.reload
23 # - nsIDOMNSHistory.go
24 # - nsIDOMJSPluginArray.refresh
25 # - nsIDOMWindow.postMessage
26 # - nsIDOMJSWindow.{prompt,setTimeout,setInterval,open,openDialog}
27 #
28 # (And nsIDOMModalContentWindow.returnValue is an attribute of type
29 # nsIVariant, which qsgen.py can't handle.)
30 #
31 # nsLocationSH has ~ALLOW_PROP_MODS_TO_PROTOTYPE, so don't try.
32 #'nsIDOMLocation.hostname',
33 #'nsIDOMLocation.href',
35 # dom/interfaces/storage
36 'nsIDOMStorage.setItem',
37 'nsIDOMStorage.length',
38 'nsIDOMStorage.getItem',
39 'nsIDOMStorage.key',
40 'nsIDOMStorage.removeItem',
41 'nsIDOMStorage.clear',
43 # dom/interfaces/xpath
44 'nsIDOMXPathExpression.evaluate',
45 'nsIDOMXPathNSResolver.lookupNamespaceURI',
46 'nsIDOMXPathResult.snapshotItem',
47 'nsIDOMXPathResult.iterateNext',
48 'nsIDOMXPathResult.snapshotLength',
49 'nsIDOMXPathResult.resultType',
50 'nsIDOMXPathResult.numberValue',
51 'nsIDOMXPathResult.stringValue',
52 'nsIDOMXPathResult.booleanValue',
53 'nsIDOMXPathResult.singleNodeValue',
54 'nsIDOMNSXPathExpression.evaluateWithContext',
56 # layout/xul/base/public
57 'nsIBoxObject.x',
58 'nsIBoxObject.y',
59 'nsIBoxObject.screenX',
60 'nsIBoxObject.screenY',
61 'nsIBoxObject.width',
62 'nsIBoxObject.height',
64 # dom/indexedDB
65 'nsIIndexedDatabaseManager.*',
67 # dom/quota
68 'nsIQuotaManager.*',
69 'nsIQuotaRequest.*',
70 'nsIUsageCallback.*',
71 ]
73 # Most interfaces can be found by searching the includePath; to find
74 # nsIDOMEvent, for example, just look for nsIDOMEvent.idl. But IDL filenames
75 # for very long interface names are slightly abbreviated, and many interfaces
76 # don't have their own files, just for extra wackiness. So qsgen.py needs
77 # a little help.
78 #
79 irregularFilenames = {
80 # stowaways
81 'nsIDOMBlob': 'nsIDOMFile',
82 'nsIIndexedDatabaseUsageCallback': 'nsIIndexedDatabaseManager',
83 'nsITelephoneCallback': 'nsITelephone',
84 }
86 customIncludes = [
87 'mozilla/dom/BindingUtils.h',
88 'mozilla/dom/EventTargetBinding.h',
89 'mozilla/dom/WindowBinding.h',
90 ]
92 nsIDOMStorage_Clear_customMethodCallCode = """
93 rv = self->Clear();
94 if (NS_SUCCEEDED(rv))
95 JS_ClearNonGlobalObject(cx, obj);
96 """
98 customMethodCalls = {
99 'nsIDOMStorage_Clear': {
100 'code': nsIDOMStorage_Clear_customMethodCallCode
101 },
102 }
104 newBindingProperties = {
105 # Once the last entry here goes away, we can make the sNativePropertyHooks
106 # of bindings static.
107 'nsIDOMEventTarget': '&mozilla::dom::EventTargetBinding::sNativePropertyHooks->mNativeProperties',
108 'nsIDOMWindow': '&mozilla::dom::WindowBinding::sNativePropertyHooks->mNativeProperties',
109 }