When the Components object is created I currently compile some JS code to attach function properties to it: ID, Exception, and Constructor. http://lxr.mozilla.org/seamonkey/source/js/src/xpconnect/src/xpccomponents.cpp#1 039 Unfortunately, This compilation is done without principals. It is not clear that appropriate principals will be available at this point - in DOM this happens during nsJSContext::InitClasses. I don't want to compile with principals that have too much power since access to these JS props is not actually otherwise protected. I'm starting to think that I'll have to reimplement this code in C++. There is a plus to this... Since these three functions are made to appear as JS ctors we'll be able to make instanceof work 'correctly' where now it really doesn't; e.g (foo instanceof Components.Exception)
fix checked in. I reimplemented them in C++
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.