summaryrefslogtreecommitdiffstats
path: root/webkit/tools/pepper_test_plugin
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-24 17:22:26 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-24 17:22:26 +0000
commit3d805c350c9dc431d71e9156fbbff0b330be4717 (patch)
tree4ac7984076ae3c968589d97bc7b70e10d871c877 /webkit/tools/pepper_test_plugin
parent65776ee227785343f00145060f6ff0b355e133f1 (diff)
downloadchromium_src-3d805c350c9dc431d71e9156fbbff0b330be4717.zip
chromium_src-3d805c350c9dc431d71e9156fbbff0b330be4717.tar.gz
chromium_src-3d805c350c9dc431d71e9156fbbff0b330be4717.tar.bz2
Remove use of Skia's safeUnref() in favor of SkSafeUnref(...)
safeUnref() technically has undefined behavior on a null pointer. TEST=green bots BUG=none Review URL: http://codereview.chromium.org/3475007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/pepper_test_plugin')
-rw-r--r--webkit/tools/pepper_test_plugin/plugin_object.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/webkit/tools/pepper_test_plugin/plugin_object.cc b/webkit/tools/pepper_test_plugin/plugin_object.cc
index bd11a8e..b66a2af 100644
--- a/webkit/tools/pepper_test_plugin/plugin_object.cc
+++ b/webkit/tools/pepper_test_plugin/plugin_object.cc
@@ -252,9 +252,8 @@ void DrawSampleBitmap(void *region, int width, int height) {
SkPoint grad_points[2];
grad_points[0].set(SkIntToScalar(0), SkIntToScalar(0));
grad_points[1].set(SkIntToScalar(0), SkIntToScalar(height));
- paint.setShader(SkGradientShader::CreateLinear(
- grad_points, grad_colors, NULL, 2, SkShader::kRepeat_TileMode))
- ->safeUnref();
+ SkSafeUnref(paint.setShader(SkGradientShader::CreateLinear(
+ grad_points, grad_colors, NULL, 2, SkShader::kRepeat_TileMode)));
canvas.drawPath(path, paint);
}