开发者

FireFox 6: implementing nsIProtocolHandler

Has something changed in Firefox 6 so I can no longer add my nsIProtocolHandler (and nsIChannel) implementation from an add-on just by registering it under a contract like @mozilla.org/network/protocol;1?name=myscheme? I've checked all the interfaces I use if any changed (judging by a new UUID), but I don't get a call to my getFactoryProc I list in NSModule, like I did before. Do I need to add a category (like http-startup or something?) or is something else wrong? (the code that worked in firefox 3开发者_如何转开发.6 is still here I haven't committed the new code yet...)

Update: I've logged this as a bug.


Update: Okay, I figured this out. See https://bugzilla.mozilla.org/show_bug.cgi?id=656331. Basically you need to export the right kVersion value in your module or the library will be unloaded immediately after it is loaded (i.e. the behavior you are observing). This behavior is new as of Firefox 5.

If you haven't updated to Firefox 4 yet then you need to change the way that you register your XPCOM component. See https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0. The sections on JS components or binary components are relevant depending on whether your component is implemented in JS or C++.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜