Re: js callback, proxies and NS_ERROR_XPC_JS_THREW_STRING error

2007-08-28 Thread Antoine Junod
Antoine Junod <[EMAIL PROTECTED]> writes: > timeless <[EMAIL PROTECTED]> writes: > > > On Aug 20, 10:22 am, Antoine Junod <[EMAIL PROTECTED]> wrote: [...] > > I'd also encourage you to treat "call" as a reserved word. It's way > > too confusing having a function named "call" which is not the EC

Re: The future of XPCOM memory management

2007-08-28 Thread [EMAIL PROTECTED]
On Aug 28, 6:23 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Aug 28, 6:07 pm, mhammond <[EMAIL PROTECTED]> wrote: > > > The XPCOM objects exposed > > by Python can be made a GCObject - but I'm not sure how we would > > integrate the rest of the Python universe - eg, assuming we have an >

Re: The future of XPCOM memory management

2007-08-28 Thread [EMAIL PROTECTED]
On Aug 28, 6:07 pm, mhammond <[EMAIL PROTECTED]> wrote: > The XPCOM objects exposed > by Python can be made a GCObject - but I'm not sure how we would > integrate the rest of the Python universe - eg, assuming we have an > arbitrary number of Python objects holding pointers to xpcom objects, MMgc

Re: The future of XPCOM memory management

2007-08-28 Thread [EMAIL PROTECTED]
Replying to several messages/thoughts at once: 1. Losing the cycle collector's support for other languages is necessary to get C++ and JS on a better footing -- a shared GC heap. But the idea and even code could be harvested for use by other language runtimes, since we will still face uncollectabl

Re: The future of XPCOM memory management

2007-08-28 Thread mhammond
On Aug 29, 9:46 am, "L. David Baron" <[EMAIL PROTECTED]> wrote: > Jason Orendorff wrote: > > * Delete the cycle collector. > > Are we dropping the multi-language aspects of the platform (introduced > in this milestone, at considerable effort > inhttps://bugzilla.mozilla.org/show_bug.cgi?id=2559

Re: The future of XPCOM memory management

2007-08-28 Thread L. David Baron
Jason Orendorff wrote: > * Add thread-safety to MMgc using the Spidermonkey request model. We currently don't pay the cost of thread-safety for most XPCOM objects, since most objects are main-thread-only. Would doing this impose significant performance penalties for locking or atomic operatio

Re: The future of XPCOM memory management

2007-08-28 Thread Jonas Sicking
One thing not raised in your proposal is what to do with objects that are currently *not* refcounted. Two good examples are strings (nsString and friends) and arrays, for example nsTArray. If we turn all currently refcounted objects into GCFinalizedObject, then any nsString and nsTArray inline mem

Re: The future of XPCOM memory management

2007-08-28 Thread Jonas Sicking
I definitely think we should try to get rid of reference counting in favor of garbage collection. There are a few things that I'm worried about and that needs investigation. How complicated is embedding going to be? I suspect it's going to be more complicated than now in some ways, since interacti

Re: The future of XPCOM memory management

2007-08-28 Thread Jason Orendorff
On Aug 28, 9:34 am, Jason Orendorff <[EMAIL PROTECTED]> wrote: > More on this in a few hours. I don't think there's such a thing as a contract that (a) is simple, (b) is efficient, (c) supports GC, (d) supports refcounting for objects that want it, and (e) really hides memory management implementa

Re: Character encoding converters

2007-08-28 Thread Christian Biesinger
telega wrote: > Is it possible to use Character encoding converters from Firefox > extension (javascript) ? > I want to encode strings from UTF-8 to national encodings > (windows-1251). I tried to use: Use nsIScriptableUnicodeConverter. http://developer.mozilla.org/en/docs/Writing_textual_data m

Re: DOM Inspector for Windows XULRunner Application

2007-08-28 Thread mark . finkle
On Aug 28, 11:12 am, pranav-sundar <[EMAIL PROTECTED]> wrote: > Hi, > > I have developed a XULRunner Application. For debugging purpose, > i would like to add DOM Inspector extension. I added DOM > Inspector extension of Firefox to XULRunner App, but it is not > working. I think it is t

Character encoding converters

2007-08-28 Thread telega
Hi Is it possible to use Character encoding converters from Firefox extension (javascript) ? I want to encode strings from UTF-8 to national encodings (windows-1251). I tried to use: var charsetManager = Components.classes["@mozilla.org/charset- converter-manager;1"]

DOM Inspector for Windows XULRunner Application

2007-08-28 Thread pranav-sundar
Hi, I have developed a XULRunner Application. For debugging purpose, i would like to add DOM Inspector extension. I added DOM Inspector extension of Firefox to XULRunner App, but it is not working. I think it is the problem with inspector.dll which is built on Firefox source code.

The future of XPCOM memory management

2007-08-28 Thread Jason Orendorff
AddRef and Release constitute a contract between every XPCOM object and all its users. The contract governs object lifetimes, finalization order, and memory management. Advantages of this specific contract: 1. It's relatively simple. 2. It requires no global coordination. 3. Prompt destruc

The future of XPCOM

2007-08-28 Thread Jason Orendorff
In Mozilla 2, we have an opportunity to make major, non-backwards- compatible changes to XPCOM. What do we actually want to do here? bsmedberg wrote about this last December. BSBlog: Improving XPCOM for Mozilla 2 http://benjamin.smedbergs.us/blog/2006-12-22/improving-xpcom-for-mozilla-2/ Th

Re: XPCOM in javascript example

2007-08-28 Thread Nikitas Liogkas
Have a look here too: http://kb.mozillazine.org/Implementing_XPCOM_components_in_JavaScript This page has a complete example that should work. HTH, nikitas mlabs wrote: > I followed this line by line .. and I still can't get it to work : > > http://developer.mozilla.org/en/docs/How_to_Build_an

Re: how to return an array from an xpcom components.....?

2007-08-28 Thread Nikitas Liogkas
Or http://weblogs.mozillazine.org/weirdal/XPCOM/XPCOM_CheatSheet.xml#handle-array nikitas pranav-sundar wrote: > On Aug 16, 3:35 pm, MADDY <[EMAIL PROTECTED]> wrote: >> hi All. >> >> can any buddy tell me how to return an array from an xpcom >> components. >> >> actually my project req

Re: Redirect URL from extension

2007-08-28 Thread Nikitas Liogkas
I believe you can just do: gURLBar.value = newurl; // sets the location bar value handleURLBarCommand(); // loads the URL in the location bar HTH, nikitas [EMAIL PROTECTED] wrote: > My task is to write a Firefox extension which analyses URL requested > by the user and redirect the browser base