[Webkit-unassigned] [Bug 31423] [Android] The Android-specific files in platform/android are out of date

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 13 11:54:25 PST 2009


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


Dmitry Titov <dimich at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #43172|review?                     |review-
               Flag|                            |




--- Comment #6 from Dmitry Titov <dimich at chromium.org>  2009-11-13 11:54:25 PST ---
(From update of attachment 43172)
Just one tiny thing before we can send the patch to commit-queue... I would do
r+ with "fix on landing" but I think you are not yet a committer.

> +PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page* page)
> +{
> +    RefPtr<RenderTheme> androidTheme = RenderThemeAndroid::create();
> +    return androidTheme.release();
> +}

This will cause a new theme to be created for every request of themeForPage().
The other themes use static pointer initialized via releaseRef(), essentially
pinning the refcount of the created theme at 1, so the theme is only created
once, like here in RenderThemeChromiumMac: 

PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page*)
{
    static RenderTheme* rt = RenderThemeChromiumMac::create().releaseRef();
    return rt;
}

If there is no other considerations, it's better to keep the usage pattern.

-- 
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