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
1
vote
2 answers

firefox addon packet sniffer

I want to sniff the packets with my addon. I am using this Stack overflow question as hint. My full code is this: // This is an active module of the Add on exports.main = function() { var {Cc, Ci,Cu} = require("chrome"); var widgets =…
prongs
  • 9,422
  • 21
  • 67
  • 105
1
vote
1 answer

How to access a SQLite database inside the data directory in add on builder

Is there any way to access a SQLite database inside the Data directory in the add-on builder using add-on sdk v1.5? this is the code that i am using: var {Cc, Ci, Cu} = require("chrome"); var data = require('self').data; // This is an active module…
Pankaj Kumar
  • 1,748
  • 6
  • 28
  • 41
1
vote
1 answer

How to listen to 'SendMail' event in Thunderbird?

I need to intercept all mail sent by Thunderbird and block sending if there is a predefined string in the mail body. It should be a part of our already existing XPCOM dll addon. Do you have any ideas how to implement it?
Yarik
  • 1,172
  • 2
  • 9
  • 17
1
vote
1 answer

Calling NS_DispatchToMainThread from WinAPI thread

I know that most XPCOM methods are not thread safe, but is it safe to send events from WinAPI worker thread to XPCOM main thread using NS_DispatchToMainThread?
Rom.ek
  • 15
  • 5
1
vote
3 answers

nsIProtocolHandler and nsIURI: Relative URLs in self-created protocol

I have a simple implementation of custom protocol. It's said that newURI method takes 3 arguments (spec, charset & baseURI) and "if the protocol has no concept of relative URIs, third parameter is ignored". So i open a page like this…
Dmitrii Sorin
  • 3,855
  • 4
  • 31
  • 40
1
vote
2 answers

XPCOM object method is unaccessible from JavaScript

I'm trying to build an extension for Firefox. This extension uses an XPCOM component (a C++ dll). I'm compiling the DLL, compilation is OK. I also succeeded in building a JS code which instanciates the object from XPCOM: try { greenfox; return…
frinux
  • 2,052
  • 6
  • 26
  • 47
1
vote
2 answers

Mozilla XPCOM is not registered

I'm trying to build an extension for Firefox. This extension uses an XPCOM component (a C++ dll). I'm compiling the DLL, compilation is OK. The next step would be to use the component in Javascript from my extension. I added the code to register my…
frinux
  • 2,052
  • 6
  • 26
  • 47
1
vote
2 answers

Desktop Application upon Gecko/Mozilla or WebKit

How can I develop an installable desktop application on top of the Mozilla Engine or the Webkit engine. We want to have best of both worlds, ease of development with DOM+Javascript+RenderingEngine+ContinuedImprovements in a Browser and user's…
Raks
  • 1,723
  • 3
  • 18
  • 26
1
vote
1 answer

Pass XPCOM interface pointer cross the thread

I am new to develop Firefox extension with XPCOM. Currently I am using a background thread to do some work in XPCOM and need to pass a pointer of one XPCOM interface (eg nsIDomwindow) from main thread to that thread. But if use the pointer as the…
Derfson
  • 11
  • 1
1
vote
1 answer

Dependency Injection in XPCOM

One of my XPCOM components make use of other XPCOM components. As I was testing it, I found it cumbersome cos of the dependencies. Then I thought of using Dependency Injection to pass in the other components in my constructor. I wasn't successful.…
liangzan
  • 6,804
  • 4
  • 29
  • 28
1
vote
1 answer

Get absolute url from relative url in firefox extension?

In my FF extension, I want to get the absolute URL of all the links in a page. I know this can be done by JS. But I want to know whether this can be done by any FF service. Thanks for help.
Selvaraj M A
  • 3,096
  • 3
  • 30
  • 46
1
vote
0 answers

Using xpcom with django

I am usign xpcom objects with django. When i use development server everything works fine but when I switch to Apache server with mod_wsgi I get interface not found error. I have searched a lot about the error, which says that the id is different…
Akshay Deo
  • 528
  • 1
  • 6
  • 22
1
vote
1 answer

Xulrunner/JavaXPCOM - How to create instances of imgIContainer?

I am trying to create a Java-XPCOM version of this answer: xul/xpcom copy image from string to clipboard I am able to get hold of most of the services/components via calls such as these listed below (clipboard, io, transferable), but I can't do the…
Pradyumna
  • 1,583
  • 4
  • 19
  • 34
1
vote
1 answer

Is it possible to add and modify the dns cached entry in firefox?

I am trying to accomplish some specific test requirement. One of the requirement now is to redirect some nonexistent url to specific ip, which is what the dns is doing. I think firefox is using internal dns cache. But I cannot find a proper…
winterTTr
  • 1,739
  • 1
  • 10
  • 30
1
vote
1 answer

Writing a Firefox XPCOM plug-in with a native window interface? (like ActiveX control)

I have an ActiveX control that works fine in Internet Explorer and the ActiveX Control Test Container program. The actual behavior of the control is split in two parts, where one part is the ATL gunk that interfaces with the OLE host, and the other…
Jon Watte