My favorites | Sign in
Logo
             
New issue | Search
for
| Advanced search | Search tips
Issue 2456: Embedding firebug service in a non-XUL app cannot getService for nsIXULAppInfo
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  johnjbar...@johnjbarton.com
Closed:  Nov 06
Cc:  johnjbar...@johnjbarton.com
Type-Enhancement
debugger
1.5
Test-case-needed


Sign in to add a comment
 
Reported by simon.kaegi, Nov 04, 2009
I'm embedding the firebug service in an SWT_Browser widget and so far have 
been relatively successful however I've had to do a tweak.

The line: [firebug-service.js 42]
const appInfo = Cc["@mozilla.org/xre/app-info;1"].getService
(Ci.nsIXULAppInfo);

...will throw an exception when running embedded in a non-XUL app because 
the nsIXULAppInfo interface is not implemented for some reason. To help us 
with re-using could the code instead do a getService and instanceof check?

e.g. perhaps something like...
var hasXULAppInfo = Cc["@mozilla.org/xre/app-info;1"].getService() 
instanceof Ci.nsIXULAppInfo;
const appInfo = (hasXULAppInfo) ? Cc["@mozilla.org/xre/app-
info;1"].getService(Ci.nsIXULAppInfo) : null;

And then the appropriate null checks later on...


Comment 1 by johnjbar...@johnjbarton.com, Nov 04, 2009
Fixed at R4776 on branches/firebug1.5 for Firebug 1.5b3.

I just removed the code, it was no longer needed.

But it can reappear. nsIXULAppInfo is part of XULRunner after 1.8, quite an old code. 
Status: Commit
Owner: johnjbar...@johnjbarton.com
Cc: johnjbar...@johnjbarton.com
Labels: Type-Enhancement debugger 1.5 Test-case-needed
Comment 2 by johnjbar...@johnjbarton.com, Nov 06, 2009
Firebug 1.5b3
Status: Fixed
Sign in to add a comment

Hosted by Google Code