Skip to content

Commit 0cdeb56

Browse files
committed
Fix the mock RefPtr
1 parent 6b4a6b8 commit 0cdeb56

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

clang/test/Analysis/Checkers/WebKit/mock-types.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,13 @@ template <typename T> struct RefPtr {
9595
t->ref();
9696
}
9797
RefPtr(Ref<T>&& o)
98-
: t(o.leakRef())
98+
: t(o.leafkRef())
9999
{ }
100100
RefPtr(RefPtr&& o)
101-
: t(o.leakRef())
102-
{ }
101+
: t(o.t)
102+
{
103+
o.t = nullptr;
104+
}
103105
~RefPtr() {
104106
if (t)
105107
t->deref();

0 commit comments

Comments
 (0)