Questions tagged [xpcom]

XPCOM (Cross Platform Component Object Model) is a cross-platform component model from Mozilla. It is similar to Microsoft COM and CORBA.

XPCOM (Cross Platform Component Object Model) is a cross-platform component model from Mozilla. It is similar to Microsoft COM and CORBA.

It has multiple language bindings, allowing XPCOM components to be used and implemented in JavaScript, Java, and Python in addition to C++. Interfaces in XPCOM are defined in a dialect of IDL called XPIDL.

409 questions
2
votes
1 answer

Firefox 29, XPCOM and wrappedJSObject

We are using a custom Javascript-only add-on for Firefox, which is used in some of our intranet sites. This add-on is supposed to load a specific text file from a user's PC, and then expose specific variables to some of our intranet pages. The…
2
votes
1 answer

Is it possible to delete or invalidate gecko / firefox session without closing browser?

Is it possible, using the gecko / firefox XPCOM interfaces, to delete or invalidate a user's active session without closing the browser? I am using Gecko embedded (specifically GeckoFX) in an application where it is possible that multiple users…
jeffora
  • 4,009
  • 2
  • 25
  • 38
2
votes
1 answer

Running AppleScript from XPCOM

I've been trying to execute applescript code through XPCOM, but no matter what I do it just doesn't seem to work, the observer tells me that the process finishes without a problem, but nothing happens. var processArgs = ['-e','\'tell application…
WarriorXK
  • 33
  • 5
2
votes
1 answer

Setting a preference at startup in firefox

Thanks to everyone in advance - I need to load a preference before any windows are loaded at startup. Below is some /component code I have been working with. The SetPreference method seems to fail when it is called (nothing executes afterwords…
Sam Ingrassia
  • 115
  • 1
  • 14
2
votes
1 answer

Components.interfaces.nsIProcess2 in Firefox 3.6 -- where did it go?

I am beta testing an application that includes a Firefox extension as one component. It was originally deployed when FF3.5.5 was the latest version, and survived 3.5.6 and 3.5.7. However on FF3.6 I'm getting the following in my error…
rwired
  • 1,112
  • 3
  • 15
  • 28
2
votes
4 answers

Firefox bootstrapped extension: Get native HWND handle of the browser window

I have an external application and I want it to display some information on top of the browser window. My bootstrapped extension needs to pass the browser window handle (native HWND) to my application, along with some other useful information about…
karliwson
  • 3,365
  • 1
  • 24
  • 46
2
votes
1 answer

Javascript code modules mutual import [Firefox addon]

I came across this strange behavior while using javascript code modules for a firefox addon. I'm not sure if this is a bug or a bad design doing mutual imports. So let's say there are 3 modules a, b and c. a.js var EXPORTED_SYMBOLS = ["a"]; …
Alavalathi
  • 713
  • 2
  • 9
  • 21
2
votes
1 answer

Some words on QueryInterface magic

many times I have had an issue and post for help and so many times QueryInterface is the solution. I have been addon programming for a long time now but never understood QueryInterface. It seems like magic, like it holds the solution to…
Noitidart
  • 35,443
  • 37
  • 154
  • 323
2
votes
1 answer

How to find Contract ID by interface name?

Example: I want to use the interface of nsILocalFile in Javascript, how to find the corresponding Contract ID("@mozilla.org/file/local;1")? Is there a map in the source code?
windywater
  • 23
  • 3
2
votes
1 answer

Updating Firefox addon jsm module code without browser restart

I am developing a Firefox addon that is loaded from a directory instead of an xpi, Firefox extension proxy file. The extension is based on jsm modules. Is there a way to update those modules to reflect the code changes. The only way to do it now is…
Mircea
  • 11,373
  • 26
  • 64
  • 95
2
votes
2 answers

Create GStreamer XUL element?

I would like to create a custom XUL element named 'video' for a video editing application based on XULRunner. In the XPCOM documentation it is explained how to access your component from Javascript, but I can't seem to find any documentation on how…
StackedCrooked
  • 34,653
  • 44
  • 154
  • 278
2
votes
1 answer

How to get Tab from nsIDOMWindow?

A noob at firefox extension development here. Is there a way to find Tab object from a given nsIDOMWindow? let wm = Cc['@mozilla.org/appshell/window-mediator;1'].getService(Ci.nsIWindowMediator); var windowListener = { onOpenWindow:…
GantengX
  • 1,471
  • 2
  • 16
  • 28
2
votes
0 answers

VirtualBox XPCOM for different users

I'm using VirtualBox's XPCOM to interact with the VirtualBox information. So far everything works well. Now I'd like to interact with VirtualBox for different users. Is there any way to do this? It seems that the XPCOM only starts the VBoxSVC…
dragor
  • 21
  • 1
2
votes
1 answer

What does the isDomain property of nsICookie mean?

Can anybody give me a further explanation about the isDomain property of the nsICookie interface?
user2102196
  • 99
  • 1
  • 7
2
votes
1 answer

Adding entry to Firefox cache from an XPCOM component

The nsICacheSession has a method openCacheEntry() which returns an existing cache entry. Is there a method such as createCacheEntry() that will create a cache entry. I want to create an XPCOM object that will read files from disk and write them to…
MaxK
  • 3,511
  • 4
  • 20
  • 16