Closed Bug 344219 Opened 20 years ago Closed 20 years ago

A certain interface is not registering

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: msherborne, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.4) Gecko/20060615 Firefox/1.5.0.4 Build Identifier: Mozilla XULRunner 1.9a1_0000000000 The attached .idl compiles ok to xpt and is imported and mentioned in xpti.dat. But one of the interfaces (nsIExeDataExctractor) is not available to javascript under xulrunner, but works fine under firefox. Components.interfaces.nsIExeDataExtractor returns "undefined" Reproducible: Always Steps to Reproduce: ./run-mozilla.sh ./xpidl -I ../idl/ -w -v -e components/exeregistrar.xpt -m typelib exeregistrar.idl ./run-mozilla.sh ./regxpcom -a mkdir chrome/exe cat > chrome/exe/exe.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" width="640" height="480"> <button flex="1" label="click" oncommand="alert(Components.interfaces.nsIExeDataExtractor)"/> </window> #--- (Ctrl+D) --- echo content exe exe xpcnativewrappers=yes > chrome/exe.manifest echo pref("toolkit.defaultChromeURI", "chrome://exe/content"); > defaults/pref/exe.js cat > application.ini [App] Vendor=EXELearning.org Name=exe Version=0.1 BuildID=0000000001 Copyright=Copyright (c) 2006 EXELearning.org ID={eeaf88dc-a1bc-4d5d-a131-70665e1a859f} [Gecko] MinVersion=1.9a1 MaxVersion=2.0 #---- Ctrl+D ----- ./run-mozilla.sh ./xulrunner application.ini -console -jsconsole #Click the button Actual Results: The alert box shows undefined. in ff shows the name of the interface. Expected Results: Should behave the same as ff. (Show the name of the interface) When we tested it, we first compiled the typelibrary without the nsIExeDataRegistrar and then later added it, so it could be caused by somehow retreiving previous versions of the xpt or something. We tested on two PCs and x86 and a AMD64. This is using latest trunk.
Attached file exeregistrar.idl
This is the typelibrary that is not working from my xul app.
Attachment #228793 - Attachment description: Testcase idl → exeregistrar.idl
Have you tried this with a fresh profile? Many times we've had to completely delete the profile folder and start fresh for XULRunner to realize that xpt's had changed.
You can also change the buildid in application.ini to force a rebuild of the compreg/xpti caches.
We've tried after rm -rf ~/.gre* also on two different machines with own builds and after complete rebuilds of xulrunner. Haven't tried clean build. I'll try that today and post results here.
On a full clean rebuild of xulrunner things run ok first off. However, once the type library has been loaded and the app ran once, if you add a new interface to the typelibrary, compile and register it and run the app again, you will not be able to access the newly registered interface. Seems that it's using some cached version of type library or something?
Seems to be cached in defaults/profile somewhere This is a bug right? Shouldn't updating a .xpt in components override stuff in profile dir?
As I said, whenever you change an XPT or interface you should change the buildid in application.ini, to ensure that all caches are updated properly.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: