Rule out new skia::RefPtr objects via presubmit
Chrome is being migrated from skia::RefPtr to sk_sp<> smart pointers;
update the global presubmit script now so we don't have new instances
intruding while we chase down the last few deprecated ones.
BUG=skia:5077
Review URL: https://codereview.chromium.org/1882913002
Cr-Commit-Position: refs/heads/master@{#388275}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index ca87ae7d..4421f2e 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -187,10 +187,19 @@
),
),
(
+ 'skia::RefPtr',
+ (
+ 'The use of skia::RefPtr is prohibited. ',
+ 'Please use sk_sp<> instead.'
+ ),
+ True,
+ (),
+ ),
+ (
'SkRefPtr',
(
'The use of SkRefPtr is prohibited. ',
- 'Please use skia::RefPtr instead.'
+ 'Please use sk_sp<> instead.'
),
True,
(),
@@ -199,7 +208,7 @@
'SkAutoRef',
(
'The indirect use of SkRefPtr via SkAutoRef is prohibited. ',
- 'Please use skia::RefPtr instead.'
+ 'Please use sk_sp<> instead.'
),
True,
(),
@@ -208,7 +217,7 @@
'SkAutoTUnref',
(
'The use of SkAutoTUnref is dangerous because it implicitly ',
- 'converts to a raw pointer. Please use skia::RefPtr instead.'
+ 'converts to a raw pointer. Please use sk_sp<> instead.'
),
True,
(),
@@ -218,7 +227,7 @@
(
'The indirect use of SkAutoTUnref through SkAutoUnref is dangerous ',
'because it implicitly converts to a raw pointer. ',
- 'Please use skia::RefPtr instead.'
+ 'Please use sk_sp<> instead.'
),
True,
(),