| Index: ppapi/proxy/proxy_completion_callback_factory.h
|
| diff --git a/ppapi/proxy/proxy_completion_callback_factory.h b/ppapi/proxy/proxy_completion_callback_factory.h
|
| index 71322b0ad66526626006b80ad7f79fe1f9b6efee..4b8bafe676aab938dfb87268d43d4e856b9830af 100644
|
| --- a/ppapi/proxy/proxy_completion_callback_factory.h
|
| +++ b/ppapi/proxy/proxy_completion_callback_factory.h
|
| @@ -8,7 +8,7 @@
|
| #include <stdint.h>
|
|
|
| #include "base/logging.h"
|
| -#include "base/message_loop/message_loop.h"
|
| +#include "base/sequence_checker.h"
|
| #include "ppapi/cpp/completion_callback.h"
|
| #include "ppapi/utility/completion_callback_factory.h"
|
|
|
| @@ -21,38 +21,26 @@ class ProxyNonThreadSafeThreadTraits {
|
| public:
|
| class RefCount {
|
| public:
|
| - RefCount() : ref_(0) {
|
| -#ifndef NDEBUG
|
| - message_loop_ = base::MessageLoop::current();
|
| -#endif
|
| - }
|
| + RefCount() : ref_(0) {}
|
|
|
| ~RefCount() {
|
| -#ifndef NDEBUG
|
| - DCHECK(message_loop_ == base::MessageLoop::current());
|
| -#endif
|
| + DCHECK(sequence_checker_.CalledOnValidSequence());
|
| }
|
|
|
| int32_t AddRef() {
|
| -#ifndef NDEBUG
|
| - DCHECK(message_loop_ == base::MessageLoop::current());
|
| -#endif
|
| + DCHECK(sequence_checker_.CalledOnValidSequence());
|
| return ++ref_;
|
| }
|
|
|
| int32_t Release() {
|
| -#ifndef NDEBUG
|
| - DCHECK(message_loop_ == base::MessageLoop::current());
|
| -#endif
|
| + DCHECK(sequence_checker_.CalledOnValidSequence());
|
| DCHECK(ref_ > 0);
|
| return --ref_;
|
| }
|
|
|
| private:
|
| int32_t ref_;
|
| -#ifndef NDEBUG
|
| - base::MessageLoop* message_loop_;
|
| -#endif
|
| + base::SequenceChecker sequence_checker_;
|
| };
|
|
|
| // No-op lock class.
|
|
|