<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:beidson@apple.com" title="Brady Eidson <beidson@apple.com>"> <span class="fn">Brady Eidson</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Memory leak for a protected element having pending events in ImageLoader"
href="https://bugs.webkit.org/show_bug.cgi?id=146538">bug 146538</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #255993 Flags</td>
<td>review?
</td>
<td>review-
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Memory leak for a protected element having pending events in ImageLoader"
href="https://bugs.webkit.org/show_bug.cgi?id=146538#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Memory leak for a protected element having pending events in ImageLoader"
href="https://bugs.webkit.org/show_bug.cgi?id=146538">bug 146538</a>
from <span class="vcard"><a class="email" href="mailto:beidson@apple.com" title="Brady Eidson <beidson@apple.com>"> <span class="fn">Brady Eidson</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=255993&action=diff" name="attach_255993" title="Use RefPtr not calling ref/deref() directly">attachment 255993</a> <a href="attachment.cgi?id=255993&action=edit" title="Use RefPtr not calling ref/deref() directly">[details]</a></span>
Use RefPtr not calling ref/deref() directly
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=255993&action=review">https://bugs.webkit.org/attachment.cgi?id=255993&action=review</a>
<span class="quote">> Source/WebCore/loader/ImageLoader.cpp:372
> - element().deref();
> + m_protectedElement.clear();</span >
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>