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