| Index: webkit/media/crypto/ppapi/linked_ptr.h
|
| diff --git a/base/memory/linked_ptr.h b/webkit/media/crypto/ppapi/linked_ptr.h
|
| similarity index 94%
|
| copy from base/memory/linked_ptr.h
|
| copy to webkit/media/crypto/ppapi/linked_ptr.h
|
| index 80044add81c22cbd63f9d1d8fefa6ea077d3652b..90f350712777778349be6f47a315d04c0437c8e4 100644
|
| --- a/base/memory/linked_ptr.h
|
| +++ b/webkit/media/crypto/ppapi/linked_ptr.h
|
| @@ -2,6 +2,9 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
| //
|
| +// This is a copy of base/linked_ptr.h with CHECKS/DCHECKS replaced with
|
| +// PP_DCHECKs.
|
| +//
|
| // A "smart" pointer type with reference tracking. Every pointer to a
|
| // particular object is kept on a circular linked list. When the last pointer
|
| // to an object is destroyed or reassigned, the object is deleted.
|
| @@ -34,10 +37,10 @@
|
| // - is thread safe for copying and deletion
|
| // - supports weak_ptrs
|
|
|
| -#ifndef BASE_MEMORY_LINKED_PTR_H_
|
| -#define BASE_MEMORY_LINKED_PTR_H_
|
| +#ifndef WEBKIT_MEDIA_CRYPTO_PPAPI_LINKED_PTR_H_
|
| +#define WEBKIT_MEDIA_CRYPTO_PPAPI_LINKED_PTR_H_
|
|
|
| -#include "base/logging.h" // for CHECK macros
|
| +#include "ppapi/cpp/logging.h"
|
|
|
| // This is used internally by all instances of linked_ptr<>. It needs to be
|
| // a non-template class because different types of linked_ptr<> can refer to
|
| @@ -87,7 +90,7 @@ class linked_ptr {
|
| template <typename U> linked_ptr(linked_ptr<U> const& ptr) { copy(&ptr); }
|
|
|
| linked_ptr(linked_ptr const& ptr) {
|
| - DCHECK_NE(&ptr, this);
|
| + PP_DCHECK(&ptr != this);
|
| copy(&ptr);
|
| }
|
|
|
| @@ -118,7 +121,8 @@ class linked_ptr {
|
| // Sole ownership by this linked_ptr object is required.
|
| T* release() {
|
| bool last = link_.depart();
|
| - CHECK(last);
|
| + PP_DCHECK(last);
|
| + (void)last;
|
| T* v = value_;
|
| value_ = NULL;
|
| return v;
|
| @@ -178,4 +182,4 @@ linked_ptr<T> make_linked_ptr(T* ptr) {
|
| return linked_ptr<T>(ptr);
|
| }
|
|
|
| -#endif // BASE_MEMORY_LINKED_PTR_H_
|
| +#endif // WEBKIT_MEDIA_CRYPTO_PPAPI_LINKED_PTR_H_
|
|
|