Closed
Bug 293544
Opened 20 years ago
Closed 20 years ago
2D Context needs to not hold pointer after Release
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: vlad, Unassigned)
Details
Right now, CanvasRenderingContext2D does this:
mDOMCanvasElement = aCanvasElement;
if (mDOMCanvasElement) {
if (NS_SUCCEEDED (CallQueryInterface(mDOMCanvasElement, &mCanvasElement)
)) {
// don't hold a ref to this!
mCanvasElement->Release();
}
} else {
mCanvasElement = nsnull;
}
to have "weak" refs to both the nsIDOMHTMLCanvasElement and nsICanvasElement
interfaces. The method should take both as params, instead of doing
CallQI/Release().
Why do you need mDOMCanvasElement at all? Just QI to nsIDOMHTMLCanvasElement in
the few places you need it and remove the member.
Reporter | ||
Comment 2•20 years ago
|
||
Patch for this in bug 293267's speedup patch.
Reporter | ||
Comment 3•20 years ago
|
||
Checked in with 293267.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•