[webkit-reviews] review denied: [Bug 31423] [Android] The Android-specific files in platform/android are out of date : [Attachment 43172] Bring existing files in platform/android in line with Android 2.0 (v2)

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


Dmitry Titov <dimich at chromium.org> has denied Andrei Popescu
<andreip at google.com>'s request for review:
Bug 31423: [Android] The Android-specific files in platform/android are out of
date
https://bugs.webkit.org/show_bug.cgi?id=31423

Attachment 43172: Bring existing files in platform/android in line with Android
2.0 (v2)
https://bugs.webkit.org/attachment.cgi?id=43172&action=review

------- Additional Comments from Dmitry Titov <dimich at chromium.org>
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.


More information about the webkit-reviews mailing list