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.
Mass-reassigning bugs to firstname.lastname@example.org
jst, this is about callers of JS_GetContextPrivate? If not, what function's callers is this about?
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
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.