null check failure is causing a crash when DOM image elements have their src attribute set from native cpp. the problem is that there is no JSContext on the stack when the window doesn't isn't a chrome window, or it doesn't contain JS content. you can get into this boat if you have a nsWebBrowser window, w/ out chrome, and you're playing w/ DOM elements. more specifically, disabling image loading for a window using nsIWebBrowserSetup.idl, then after the document loads, going back and re-setting the image elements to cause retro-active image loading.
Target Milestone: --- → mozilla0.9.1
Nice turn around, Jud. The patch works for me. Thanks.
The code is fine, the comment I'd like to change: 1) This is an issue not only with calls from native code, but from any non-JS language. Bottom-line we have JS-specific code in generic calling paths. 2) Whether a chrome window contains the content is not relevant in any way. I guess I wasn't clear yesterday - the containing window has nothing to do with the existence of a JS context on the stack.
Oh yeah, r/sr=vidur.
Created attachment 35966 [details] [diff] [review] updated patch to reflect vidur's comment changes.
a=blizzard for 0.9.1
fix is in. Checking in nsHTMLImageElement.cpp; /cvsroot/mozilla/content/html/content/src/nsHTMLImageElement.cpp,v <-- nsHTMLImageElement.cpp new revision: 1.86; previous revision: 1.85
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.