Closed Bug 521608 Opened 15 years ago Closed 15 years ago

nsCanvasRenderingContext2D::GetPresShell may crash or leak

Categories

(Core :: Graphics: Canvas2D, defect, P2)

x86
All
defect

Tracking

()

RESOLVED FIXED
mozilla1.9.2
Tracking Status
status1.9.2 --- beta2-fixed

People

(Reporter: smaug, Assigned: smaug)

References

Details

(Whiteboard: [needs review])

Attachments

(1 file)

I was told by jst that GetOwnerDoc doesn't return null (at least not in any circumstances that JS code can trigger).

The memory leak does appear to be valid. What's the damage done by leaking?
GetOwnerDoc may return null.
Flags: blocking1.9.2?
(In reply to comment #1)
> What's the damage done by leaking?
Are you really asking this question? ;)

Leaking a presshell may leak a document, cssframeconstructor,
styleset, etc.
Attached patch patchSplinter Review
Rob, could you test this on windows 7.
Attachment #405758 - Flags: review?(tellrob)
Comment on attachment 405758 [details] [diff] [review]
patch

I'm not the right person to review this. Vlad and/or jst should look at this. Also, a crash test would be nice (or at least an explanation of why it can return NULL).
Attachment #405758 - Flags: review?(vladimir)
Attachment #405758 - Flags: review?(tellrob)
Attachment #405758 - Flags: review?(jst)
Well,  could you at least test this on Win7?

Bug 335998 is about element not having strong ref to owner document.
Flags: blocking1.9.2? → blocking1.9.2+
Priority: -- → P2
Target Milestone: --- → mozilla1.9.2
Attachment #405758 - Flags: review?(jst) → review+
http://hg.mozilla.org/mozilla-central/rev/1f0ca450bcb0
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee: nobody → Olli.Pettay
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: