Bug 46312 - Skia's safeRef() and safeUnref() functions are undefined on NULL pointers.
Summary: Skia's safeRef() and safeUnref() functions are undefined on NULL pointers.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P5 Trivial
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-22 15:01 PDT by Steve VanDeBogart
Modified: 2010-09-23 13:16 PDT (History)
4 users (show)

See Also:


Attachments
Use SkSafeRef/Unref instead of safeRef/Unref (7.63 KB, patch)
2010-09-22 15:06 PDT, Steve VanDeBogart
no flags Details | Formatted Diff | Diff
grep missed saveRef, fixed. (7.77 KB, patch)
2010-09-22 16:33 PDT, Steve VanDeBogart
levin: review+
Details | Formatted Diff | Diff
Use 0 instead of NULL in comment to appease style bot. (7.76 KB, patch)
2010-09-23 09:39 PDT, Steve VanDeBogart
no flags Details | Formatted Diff | Diff
Fill in reviewer (7.76 KB, patch)
2010-09-23 09:41 PDT, Steve VanDeBogart
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve VanDeBogart 2010-09-22 15:01:21 PDT
Skia's safeRef() and safeUnref() functions are undefined on NULL pointers.  SkSafeRef() and SkSafeUnref() should be used instead.  Patch forthcoming.
Comment 1 Steve VanDeBogart 2010-09-22 15:06:57 PDT
Created attachment 68450 [details]
Use SkSafeRef/Unref instead of safeRef/Unref
Comment 2 David Levin 2010-09-22 15:55:43 PDT
Comment on attachment 68450 [details]
Use SkSafeRef/Unref instead of safeRef/Unref

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

> WebCore/platform/graphics/skia/PlatformContextSkia.cpp:165
>      // Up the ref count of these. saveRef does nothing if 'this' is NULL.

This comment is incorrect. Please update.
Comment 3 Steve VanDeBogart 2010-09-22 16:33:18 PDT
Created attachment 68470 [details]
grep missed saveRef, fixed.
Comment 4 WebKit Review Bot 2010-09-22 16:34:34 PDT
Attachment 68470 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/platform/graphics/skia/PlatformContextSkia.cpp:165:  Use 0 instead of NULL.  [readability/null] [4]
Total errors found: 1 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Eric Seidel (no email) 2010-09-23 03:17:48 PDT
Comment on attachment 68450 [details]
Use SkSafeRef/Unref instead of safeRef/Unref

Cleared David Levin's review+ from obsolete attachment 68450 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Comment 6 David Levin 2010-09-23 07:53:17 PDT
Comment on attachment 68470 [details]
grep missed saveRef, fixed.

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

> WebCore/platform/graphics/skia/PlatformContextSkia.cpp:165
> +    // Up the ref count of these. SkSafeRef does nothing if its argument is NULL.

Use 0 instead of NULL.
Comment 7 David Levin 2010-09-23 07:55:03 PDT
Why did this get put up for review again just to fix a comment?

If you want to use the commit queue, then just attach the patch as if you were going to land it (with the reviewer filled in and nits fixed). Then just mark the patch as cq+ (or get any committer to do so). No need for a new review :)
Comment 8 Steve VanDeBogart 2010-09-23 09:39:49 PDT
Created attachment 68530 [details]
Use 0 instead of NULL in comment to appease style bot.
Comment 9 Steve VanDeBogart 2010-09-23 09:41:48 PDT
Created attachment 68531 [details]
Fill in reviewer
Comment 10 Steve VanDeBogart 2010-09-23 09:42:45 PDT
Sorry, I infrequently submit webkit patches.
Comment 11 Steve VanDeBogart 2010-09-23 11:00:33 PDT
Landed by jhawkins as r68165.