Bug 821317 - reduce the size of DOMClass.mInterfaceChain to something reasonable; r=bz

This commit is contained in:
Nathan Froyd 2012-12-13 11:01:00 -05:00
parent 670f0ff137
commit a152f6602b
2 changed files with 5 additions and 1 deletions

View File

@ -7778,6 +7778,10 @@ class GlobalGenRoots():
curr = CGList([idEnum])
# Let things know the maximum length of the prototype chain.
maxMacro = CGGeneric(declare="#define MAX_PROTOTYPE_CHAIN_LENGTH " + str(config.maxProtoChainLength))
curr.append(CGWrapper(maxMacro, post='\n\n'))
# Constructor ID enum.
constructors = [d.name for d in config.getDescriptors(hasInterfaceObject=True)]
idEnum = CGNamespacedEnum('id', 'ID', ['_ID_Start'] + constructors,

View File

@ -133,7 +133,7 @@ struct DOMClass
{
// A list of interfaces that this object implements, in order of decreasing
// derivedness.
const prototypes::ID mInterfaceChain[prototypes::id::_ID_Count];
const prototypes::ID mInterfaceChain[MAX_PROTOTYPE_CHAIN_LENGTH];
// We store the DOM object in reserved slot with index DOM_OBJECT_SLOT or in
// the proxy private if we use a proxy object.