Closed Bug 668424 Opened 13 years ago Closed 13 years ago

nsIDictionary is undefined

Categories

(Core :: XPConnect, defect)

5 Branch
All
Other
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: vb4guy, Unassigned)

Details

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
Closed: 13 years ago
Resolution: --- → INVALID
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.
I updated the article.
You need to log in before you can comment on or make changes to this bug.