Looking for working XPCOM component example (C++)

developers

#1

I know XPCOM isn’t all that popular anymore.
However, I’d still like to hack on some Firefox internals using the XPCOM C++ ABI.

Following this (quite outdated) sample and the following moz.build I end up with quite a few errors when running ./mach build from the gecko-dev root directory. Errors I’m unable to fix on my own.

moz.build

XPIDL_MODULE = 'sample'

XPIDL_SOURCES += [
  'nsISample.idl',
]

SOURCES += [
  'nsSample.cpp',
]

FINAL_LIBRARY = 'xul'

Is there any more recent documentation available?


#2

NVM.

A nap and a mug of coffee later, I’m all set.

Will post a link to my simple XPCOM C++ sample later, once I’ve had the time to thoroughly document and push it to Github.