Bug 62975 - Refactor local variable usage in CSSFontFaceSource::getFontData
Summary: Refactor local variable usage in CSSFontFaceSource::getFontData
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Minor
Assignee: Yuzo Fujishima
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-20 03:18 PDT by Yuzo Fujishima
Modified: 2011-06-20 23:57 PDT (History)
1 user (show)

See Also:


Attachments
Patch (4.56 KB, patch)
2011-06-20 03:25 PDT, Yuzo Fujishima
no flags Details | Formatted Diff | Diff
Patch (1.51 KB, patch)
2011-06-20 23:02 PDT, Yuzo Fujishima
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuzo Fujishima 2011-06-20 03:18:33 PDT
There are two issues in the local variable usages in CSSFontFaceSource::getFontData

- There are two different local variables named "fontData".
- One is of type OwnPtr<SimpleFontData> where SimpleFontData* would suffice.
Comment 1 Yuzo Fujishima 2011-06-20 03:25:09 PDT
Created attachment 97775 [details]
Patch
Comment 2 Kent Tamura 2011-06-20 19:16:39 PDT
Comment on attachment 97775 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=97775&action=review

> Source/WebCore/css/CSSFontFaceSource.cpp:121
> -    OwnPtr<SimpleFontData> fontData;
> +    SimpleFontData* fontData = 0;

I don't think this change is reasonable.
fontData.leakPtr() shows us that this 'fontData' object is not deleted by anyone. Your change will remove this intention.
Comment 3 Yuzo Fujishima 2011-06-20 23:02:55 PDT
Created attachment 97933 [details]
Patch
Comment 4 Yuzo Fujishima 2011-06-20 23:04:10 PDT
Thank you for the review.

I've reverted the second part. Can you take another look?
Comment 5 Kent Tamura 2011-06-20 23:06:39 PDT
Comment on attachment 97933 [details]
Patch

ok
Comment 6 WebKit Review Bot 2011-06-20 23:57:08 PDT
Comment on attachment 97933 [details]
Patch

Clearing flags on attachment: 97933

Committed r89340: <http://trac.webkit.org/changeset/89340>
Comment 7 WebKit Review Bot 2011-06-20 23:57:12 PDT
All reviewed patches have been landed.  Closing bug.