MDN wants to talk to developers like you:

XPCOM changes in Gecko 2.0

Memory allocation

Thanks for this article, it helps to upgrade but the sample in the C++ XPCOM is a lot too simple.

Practically, I am trying to recompile my extension :
While, I can compile it with old version of Firefox. I can not with FF4.0

I am in this infernal circle :

  • I need to recompile my extension because of change in XPCOM
  • There is no complete sample of an C++ extension.
  • There are numerous changes that are not clear. I spent a lot of time to understand what to do. I am not sure if what I do is right or wrong
  • I can not compile my extension because I do not find how to use XPCOM_GLUE in FF4.0 and memory allocation... It seems that this has changed completely and the compiler is not happy :-/
  • The sample xpcom/sample/nsISample is not using XPCOM_GLUE and the memory allocation seems to happen very differently.
  • Unhappily after a lot of effort. No way, I am stuck. I will need to open a bug.

Category registration

The example of the manifest entry for the cateogry registration is a bit unclear to me.

category profile-after-change MyComponent @foobar/mycomponent;1 

Syntax seems to me as follow:

  1. keyword "category"
  2. category name
  3. ????
  4. contractID

What's number 3? The name of the object as it is defined in the code? For the following code

function ObjName() {
 // constructor
ObjName.prototype = {
contractID: "@foobar/mycomponent;1",
// all the rest

the manifest entry would then be

category profile-after-change ObjName @foobar/mycomponent;1 

because the name is ObjName. Is this correct?

Document Tags and Contributors

 Contributors to this page: Mgueury, Sephi
 Last updated by: Mgueury,