The default bug view has changed. See this FAQ.

nsIDictionary is undefined

RESOLVED INVALID

Status

()

Core
XPConnect
RESOLVED INVALID
6 years ago
6 years ago

People

(Reporter: vb4guy, Unassigned)

Tracking

5 Branch
All
Other
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)

Steps to reproduce:

The following JavaScript doesn't work in Firefox 5:

        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
        var nsIDictionary = Components.classes["@mozilla.org/dictionary;1"].createInstance(Components.interfaces.nsIDictionary);



Actual results:

Received error in JavaScript: Components.classes['@mozilla.org/dictionary;1'] is undefined


Expected results:

Returned a new instance of nsIDictionary
When did it work? nsIDictionary hasn't been part of the Firefox code since Firefox 3.5 or so.

Also, we disabled .enablePrivilege for web content, which may affect your testcase, although I'd expect a different exception in that case.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → INVALID
(Reporter)

Comment 2

6 years ago
Can someone please update the article to say that it is no longer part of Firefox?  (see: https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIDictionary)

As for the enablePrivilege, I need to call this for *all* of the XPCOM interfaces otherwise Firefox says that I don't have permissions to access any of the methods/attributes for the objects.
(Reporter)

Comment 3

6 years ago
I updated the article.
You need to log in before you can comment on or make changes to this bug.