> Where can I download mozalloc.lib from?
You don't need mozalloc.lib, just use NS_Alloc/NS_Realloc/NS_Free for
all your XPCOM allocations.
--
Warning: May contain traces of nuts.
Chi Song Tao @ Beijing
>I use nsFocusManager::GetManager() so as to get an instance of nsIFocusManager.
>However, i get an unknown symbol error for nsFocusManager when linking, can anyone help me?
>
>
nsFocusManager is only available internally. External code should use
the "@mozilla.org/focus-manager;1" service.
Chi Song Tao @ Beijing
_______________________________________________
dev-extensions mailing list
dev-ext...@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-extensions
>Can you show me some example code?
>I failed to get the service...
>
I only know of example JS code, such as this portion of printUtils.js:
299 var fm = Components.classes["@mozilla.org/focus-manager;1"]
300 .getService(Components.interfaces.nsIFocusManager);
301 if (gFocusedElement)
302 fm.setFocus(gFocusedElement, fm.FLAG_NOSCROLL);
BTW, why is there nearly nothing helpful in MDC about creating extensions in native code? Most of the docs about this are out of date and Lack of example also lead to difficulty.
From: Neil
Date: 2010-08-02 22:36:25
To: dev-extensions
Cc:
Subject: Re: Get a link error when getting nsIFocusManager in vc++
>BTW, why is there nearly nothing helpful in MDC about creating extensions in native code?
>
Because native code extensions are much harder to support. In fact the
current line is that you should use ctypes to access native code for
functions that you can't implement in script.
Same here. I can find mozalloc library on Mac/Linux SDK, but can't
find on Windows SDK, and xpcomglue_s requires mozalloc.lib on all
platforms.
>The problem is not malloc & free in our code, but in code used by xpcomglue_s.lib
>
>
It turns out that this is a known issue being tracked in bug 577831.
> Dudi Gal wrote:
>
>> The problem is not malloc & free in our code, but in code used by
>> xpcomglue_s.lib
>
> It turns out that this is a known issue being tracked in bug 577831.
Oops, you already knew that of course, since you did the right thing and
filed a bug.