Closed
Bug 82536
Opened 25 years ago
Closed 25 years ago
null JSContext in native DOM image src attribution manipulation
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: jud, Assigned: jud)
Details
(Keywords: crash)
Attachments
(2 files)
|
1.22 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.07 KB,
patch
|
Details | Diff | Splinter Review |
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.
| Assignee | ||
Comment 1•25 years ago
|
||
Comment 2•25 years ago
|
||
Nice turn around, Jud.
The patch works for me.
Thanks.
Comment 3•25 years ago
|
||
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.
Comment 4•25 years ago
|
||
Oh yeah, r/sr=vidur.
| Assignee | ||
Comment 5•25 years ago
|
||
Comment 6•25 years ago
|
||
a=blizzard for 0.9.1
Comment 7•25 years ago
|
||
r=jband
| Assignee | ||
Comment 8•25 years ago
|
||
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
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•