JS properties of 'Components' compiled without Principals

RESOLVED FIXED

Status

()

P3
normal
RESOLVED FIXED
19 years ago
19 years ago

People

(Reporter: jband_mozilla, Assigned: jband_mozilla)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

19 years ago
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)
(Assignee)

Comment 1

19 years ago
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.