[Webkit-unassigned] [Bug 146538] Memory leak for a protected element having pending events in ImageLoader

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 2 08:45:05 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=146538

Brady Eidson <beidson at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #255993|review?                     |review-
              Flags|                            |

--- Comment #6 from Brady Eidson <beidson at apple.com> ---
Comment on attachment 255993
  --> https://bugs.webkit.org/attachment.cgi?id=255993
Use RefPtr not calling ref/deref() directly

View in context: https://bugs.webkit.org/attachment.cgi?id=255993&action=review

> Source/WebCore/loader/ImageLoader.cpp:372
> -    element().deref();
> +    m_protectedElement.clear();

Change this to:
m_protectedElement = nullptr;

With this code, people have to ask themselves "what kind of object is this, and what does clear do?"
With nullptr assignment, anybody not familiar with the code knows it is a pointer being null'ed out.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150702/e9149b9c/attachment-0001.html>


More information about the webkit-unassigned mailing list