[webkit-reviews] review granted: [Bug 117608] Report the memory cost of HTMLMediaElements to GC. : [Attachment 204642] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 13 17:44:17 PDT 2013
Darin Adler <darin at apple.com> has granted Jer Noble <jer.noble at apple.com>'s
request for review:
Bug 117608: Report the memory cost of HTMLMediaElements to GC.
https://bugs.webkit.org/show_bug.cgi?id=117608
Attachment 204642: Patch
https://bugs.webkit.org/attachment.cgi?id=204642&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=204642&action=review
> Source/WebCore/html/HTMLMediaElement.cpp:622
> + double extraMemoryCost = m_player->extraMemoryCost();
> + double extraMemoryCostDelta = extraMemoryCost -
m_reportedExtraMemoryCost;
> + m_reportedExtraMemoryCost = extraMemoryCost;
Why the mix of double and size_t here? It seems like extraMemoryCost is
returning size_t, so this should just be size_t.
>
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cp
p:883
> + return totalBytes() * buffered()->totalDuration() / duration;
Is there something that prevents this from overflowing a size_t?
>
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
269
> + virtual size_t extraMemoryCost() const OVERRIDE;
Either this class or this function should be marked FINAL too.
More information about the webkit-reviews
mailing list