Commit 807b6f92 authored by Chase Phillips's avatar Chase Phillips Committed by Commit Bot

scoped_refptr: Fix assert string

Change-Id: I9e7274f3ac67f57f1d0c62eb9223f437e9b1da8b
Reviewed-on: https://chromium-review.googlesource.com/c/1340832
Commit-Queue: Chase Phillips <cmp@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609943}
parent 3bd45329
......@@ -17,7 +17,7 @@ class InitialRefCountIsZero : public base::RefCounted<InitialRefCountIsZero> {
// TODO(hans): Remove .* and update the static_assert expectations once we roll
// past Clang r313315. https://crbug.com/765692.
#if defined(NCTEST_ADOPT_REF_TO_ZERO_START) // [r"fatal error: static_assert failed .*\"Use AdoptRef only for the reference count starts from one\.\""]
#if defined(NCTEST_ADOPT_REF_TO_ZERO_START) // [r"fatal error: static_assert failed .*\"Use AdoptRef only if the reference count starts from one\.\""]
void WontCompile() {
AdoptRef(new InitialRefCountIsZero());
......
......@@ -62,7 +62,7 @@ template <typename T>
scoped_refptr<T> AdoptRef(T* obj) {
using Tag = std::decay_t<decltype(T::kRefCountPreference)>;
static_assert(std::is_same<subtle::StartRefCountFromOneTag, Tag>::value,
"Use AdoptRef only for the reference count starts from one.");
"Use AdoptRef only if the reference count starts from one.");
DCHECK(obj);
DCHECK(obj->HasOneRef());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment