Closed
Bug 94066
Opened 23 years ago
Closed 20 years ago
nsIScriptContext *foo = ::JS_GetContextPrivate() callers should check for JSOPTION_PRIVATE_IS_NSISUPPORTS
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: jst, Unassigned)
Details
Once the fix for bug 82845 is checked in, code that gets JSContext private data and expects it to be of type nsIScriptContext should first check that the option bit JSOPTION_PRIVATE_IS_NSISUPPORTS is set in the context, and then get the nsISupports private data and QI to nsIScriptContext to be sure the private data really is of type nsIScriptContext.
Reporter | ||
Comment 2•21 years ago
|
||
Mass-reassigning bugs to dom_bugs@netscape.com
Assignee: jst → dom_bugs
Comment 3•20 years ago
|
||
jst, this is about callers of JS_GetContextPrivate? If not, what function's callers is this about?
Comment 4•20 years ago
|
||
I think this was mostly fixed by the fix for bug 209884. It seems like http://lxr.mozilla.org/seamonkey/source/js/jsd/jsd_xpc.cpp#1445 could be fixed and http://lxr.mozilla.org/seamonkey/source/js/jsd/jsd_xpc.cpp#1539 could use GetScriptContextFromJSContext. That's about it from a quick look at http://lxr.mozilla.org/seamonkey/search?string=JS_GetContextPrivate
Reporter | ||
Comment 5•20 years ago
|
||
jsd_xpc.cpp seems to do the right thing already, they check the context option before the assume a context's private data is nsISupports, and it doesn't seem to assume that it's nsIScriptContext anywhere (and I suspect it probably isn't, so it can't use GetScriptContextFromJSContext()), so I say this bug is done, fixed, all good. Marking FIXED.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•