======================================================================== http://mondrian.corp.google.com/file/10562599///depot/googleclient/gears/opensource/gears/canvas/canvas_rendering_element_ie.cc?a=2 File //depot/googleclient/gears/opensource/gears/canvas/canvas_rendering_element_ie.cc (snapshot 2) ------------------------------------ Line 60: paint_site_ = pElementBehaviorSite; On 7:44 pm, 30 Mar, noel wrote: > There's an implicit QI here because paint_site_ is a CComQIPtr<>. Test the > result of that implicit QI and respond accordingly.
If the QI fails, then paint_site_ will be assigned to NULL, which is fine, since paint_site_ is only used in InvalidateRenderingElement, where it is guarded by an if-check. ------------------------------------ Line 189: document->createElement(CComBSTR(STRING16(L"gearsCanvasRenderer")), &result); On 7:44 pm, 30 Mar, noel wrote: > Is the STRING16() really needed here? No, removed. ------------------------------------ Line 192: return NULL; On 7:54 pm, 30 Mar, noel wrote: > do we leak result here? and so on for each of the return NULL cases below? Fixed (result is now a CComPtr, not a raw pointer). ------------------------------------ Line 205: html_element_ = result; On 7:57 pm, 30 Mar, noel wrote: > again, and inplicit QI here -- should html_element_ just be a CComPtr<>, and how > would that help? I don't think that an explicit check for QI failure would help here -- html_element_ is only used on line 179, which is guarded by an if. ======================================================================== -- To respond, reply to this email or visit http://mondrian.corp.google.com/10562599
