gecko-dev/xpcom/typelib
Nicholas Nethercote d7801d8f98 Bug 1249174 (part 8) - Shrink XPTInterfaceDescriptor. r=khuey.
XPTInterfaceDescriptor::num_additional_types can easily fit in 8 bits -- in
practice it doesn't exceed 20, and there's already a check in DoTypeDescriptor
that it doesn't exceed 255. This patch shrinks it and moves that check into
XPT_InterfaceDescriptorAddTypes() so that any overflow would be detected more
reliably.

On 64-bit platforms this reduces sizeof(XPTInterfaceDescriptor) from 40 to 32
and correspondingly reduces "xpti-working-set" by 16 KiB.

The patch also changes XPT_InterfaceDescriptorAddTypes() into a local function,
because it's defined and only used in xpt_struct.cpp.

--HG--
extra : rebase_source : 754a343bd52c3db35b21a4055a94c7235a70a7a2
2016-02-23 16:17:59 +11:00
..
xpt Bug 1249174 (part 8) - Shrink XPTInterfaceDescriptor. r=khuey. 2016-02-23 16:17:59 +11:00
moz.build Bug 939044 - Remove most definitions of MODULE. r=mshal 2013-11-19 11:47:39 +09:00