Bug 996061 - part 1 - add GetEntryNameAt method for typelibs; r=bholley

xpt linking works with two different currencies: UUIDs of interfaces, and names
of interfaces.  Names are how we support linking in unknown-at-compile-time
interfaces at runtime.  Since we need to know names to decide whether we have
shims for interfaces or not, we need a method for exposing the names.
This commit is contained in:
Nathan Froyd 2014-05-16 16:48:29 -04:00
parent 0c64deb27f
commit e6d354ac8d
2 changed files with 12 additions and 0 deletions

View File

@ -55,3 +55,14 @@ xptiTypelibGuts::GetEntryAt(uint16_t i)
return r;
}
const char*
xptiTypelibGuts::GetEntryNameAt(uint16_t i)
{
NS_ASSERTION(mHeader, "bad state");
NS_ASSERTION(i < GetEntryCount(), "bad index");
XPTInterfaceDirectoryEntry* iface = mHeader->interface_directory + i;
return iface->name;
}

View File

@ -103,6 +103,7 @@ public:
}
xptiInterfaceEntry* GetEntryAt(uint16_t i);
const char* GetEntryNameAt(uint16_t i);
private:
xptiTypelibGuts(XPTHeader* aHeader)