Closed
Bug 116072
Opened 24 years ago
Closed 9 years ago
Access to additional properties on an nsXPCException may be needed
Categories
(Core :: XPConnect, defect, P3)
Core
XPConnect
Tracking
()
RESOLVED
WORKSFORME
mozilla1.7alpha
People
(Reporter: dbradley, Assigned: dbradley)
Details
Robert Clary brought this issue up. What is in question is should additional
nsXPCException properties be exposed. Currently you are able to enumerate the
properties, but accessing some, filename, line number, and a few others are
prohibited by security. Some discussion on this occured in bug 58538.
The following is information provided by Robert Clary:
I have been having a problem in
http://developer.netscape.com/evangelism/tools/testsuites/ on post 0.9.4 Mozilla
builds on one particular test case. tc_celm508.
It turns out that the during an exception handler where I am enumerating the
properties of an exception I get permission denied errors for the filename,
lineNumber, columnNumber of the exception.
It appears to be indicating that the exception (XPCWrappedNative_NoHelper -
http://lxr.mozilla.org/seamonkey/source/js/src/xpconnect/src/xpcwrappednativejsops.cpp#709)
does not allow me access to these properties even though they are enumerable.
The test cases are all located in
http://developer.netscape.com/evangelism/tools/testsuites/w3c-dom-core-2/. The
particular test case is
http://developer.netscape.com/evangelism/tools/testsuites/w3c-dom-core-2/tc_celm508.js.
This test case is primarily testing DOM Namespace related issues. It
intentionally does things which will/should cause exceptions.
The test frame itself is a horribly overcomplicated POS, but you can find it at:
http://developer.netscape.com/evangelism/lib/js/xbTestFrame/
The location of the actual error occurs in the xbException.init method found in
http://developer.netscape.com/evangelism/lib/js/xbObjects.js.
Exception [string] "Permission denied to get property UnknownClass.filename"
thrown from function init(errorMessage= string:"Caught Exception",
errorFile=string:"", errorFunction=string: "", exception=XPComponent: {0}) in <
http://developer. netscape.com/evangelism/ lib/js/xbObjects.js
<http://developer.netscape.com/evangelism/lib/js/xbObjects.js> > line 194.
Stopped for thrown exception.
exception.toString()
$[1] = [string] "[Exception... \"Not enough arguments [nsIDOMNamedNodeMap.
removeNamedItemNS]\" nsresult: \"0x80570001 (NS_ERROR_XPC_NOT_ ENOUGH_ARGS)\"
location: \"JS frame :: http://developer. netscape.com/evangelism/
lib/js/xbTestFrame/ xbTestFrame.js
<http://developer.netscape.com/evangelism/lib/js/xbTestFrame/xbTestFrame.js> ::
testEx :: line 241\" data: no]"
Comment 1•24 years ago
|
||
Note: this was also requested of JS Engine; see bug 50447
"JS Exceptions should have filename/linenumber properties"
| Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.1
| Assignee | ||
Comment 2•24 years ago
|
||
retargetting to post 1.0 mozilla again
| Assignee | ||
Comment 3•24 years ago
|
||
Retargetting to the proper post 1.0 milestone (really this time)
Target Milestone: mozilla1.1 → mozilla1.2
Comment 4•24 years ago
|
||
This should be pretty easy to do.
| Assignee | ||
Comment 5•24 years ago
|
||
Moving out to 1.3. If this needs to be in before 1.3 please comment.
Target Milestone: mozilla1.2alpha → mozilla1.3alpha
| Assignee | ||
Comment 6•23 years ago
|
||
Moving to 1.4 Alpha
Target Milestone: mozilla1.3alpha → mozilla1.4alpha
Updated•20 years ago
|
QA Contact: pschwartau → xpconnect
Comment 10•9 years ago
|
||
nsXPCException is just a collection of static methods now. If more modern exception representations need more properties, we can file bugs on them.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•