开发者

Error when opening the extensions manager from Xul app

开发者 https://www.devze.com 2023-01-21 21:05 出处:网络
When I open the extensions manager in my Xul app using: app = \"chrome://mozapps/content/extensions/extensions.xul\";

When I open the extensions manager in my Xul app using:

app = "chrome://mozapps/content/extensions/extensions.xul";
window.open(app,'Test','chrome, width=640, height=480').moveTo(0,0);

I get the开发者_运维百科 following error in the javascript console:

Error: uncaught exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch2.getBoolPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://mozapps/content/extensions/extensions.js :: updateGlobalCommands :: line 2388" data: no]

Any idea what's this?

ps. The extensions manager opens and works well, but I'm worried with this error message.


Lines 2387-2388 of extensions.js are:

if (!gInstalling &&
    (gPendingActions || gPref.getBoolPref(PREF_EXTENSIONS_DSS_SWITCHPENDING)))

So I guess that your application doesn't have the extensions.dss.switchPending preference set. For some reason this doesn't live in all.js so you have to set it to false in your application's default preferences.


There are some things that you need to do in your XULRunner application in order to be able to load the Extensions Manager. This component has a dependency on Branding, which is included in Firefox, but not XULRunner.

Read these XULRunner Tips that cover the things that you need to do in order to enable the Extension Manager in your XULRunner application.

Pay special attention to the changes required in your chrome.manifest, as well as the addition of 3 Firefox PNG files.

In addition, if you haven't set the preferences referenced at the top of that document, you will need to do that as well. In fact, I suggest you start at the top of that document and go down the list, verifying that you have all the necessary components in place.

0

精彩评论

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

关注公众号