[Webkit-unassigned] [Bug 64262] Small speed up, which switches some virtual functions to inline ones.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 18 06:49:37 PDT 2011


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





--- Comment #14 from Gabor Loki <loki at webkit.org>  2011-07-18 06:49:37 PST ---
> > Source/WebCore/css/CSSCanvasValue.h:52
> > +        m_isFixedSize = true;
> 
> This should use the constructor initialiazation: m_isFixedSize(true);

You cannot initialize any member of the base class from the delivered class like this. ;)

There are two popular ways to initialize the base members from delivered class:
 (1) using an assignment in the delivered constructor (as Tamas did) or
 (2) calling the base constructor with an extra parameter from the delivered constructor

Probably you wanted to suggest the second approach.
For example:
class CSSValue : public RefCounted<CSSValue> {
public:
  CSSValue(isPrimitiveValue = false)
    : m_isPrimitiveValue(isPrimitiveValue)
...
protected:
  bool m_isPrimitiveValue;
);
...
CSSPrimitiveValue(int ident)
  : CSSValue(true)
  , m_isQuirkValue(false)
  , m_type(CSS_IDENT)
  , m_hasCachedCSSText(false)
{
    m_value.ident = ident;
}
... etc ...

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list