[webkit-reviews] review granted: [Bug 56969] Move media controls subtree creation into one method. : [Attachment 86711] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 23 16:18:32 PDT 2011
Darin Adler <darin at apple.com> has granted Dimitri Glazkov (Google)
<dglazkov at chromium.org>'s request for review:
Bug 56969: Move media controls subtree creation into one method.
https://bugs.webkit.org/show_bug.cgi?id=56969
Attachment 86711: Patch
https://bugs.webkit.org/attachment.cgi?id=86711&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=86711&action=review
> Source/WebCore/rendering/MediaControlElements.cpp:800
> + setAttribute(precisionAttr, "float");
It’s not a great idea to call functional like this inside the constructor where
the object still hasn’t been adopted by its first owner. It can lead to
RefCounted assertions if anything ref/derefs. I took these out of the class
intentionally a while back, and you are undoing that.
The work should be either in a create function or at the call site rather than
in the constructor.
> Source/WebCore/rendering/MediaControlElements.cpp:864
> + setAttribute(precisionAttr, "float");
> + setAttribute(maxAttr, "1");
> + setAttribute(valueAttr, String::number(mediaElement->volume()));
Ditto.
More information about the webkit-reviews
mailing list