mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Introduce the use of Chromium types (issue #1336).
Changes to the CEF public API: - Add base::Bind, base::Callback, base::Lock, base::WeakPtr, scoped_refptr, scoped_ptr and supporting types. - Add include/wrapper/cef_closure_task.h helpers for converting a base::Closure to a CefTask. - Change CefRefPtr to extend scoped_refptr. -- Change CefBase method signatures to match RefCountedThreadSafeBase. - Change IMPLEMENT_REFCOUNTING to use base::AtomicRefCount*. -- Remove the CefAtomic* functions. -- IMPLEMENT_REFCOUNTING now enforces via a compile-time error that the correct class name was passed to the macro. - Change IMPLEMENT_LOCKING to use base::Lock. -- Remove the CefCriticalSection class. -- Deprecate the IMPLEMENT_LOCKING macro. -- base::Lock will DCHECK() in Debug builds if lock usage is reentrant. - Move include/internal/cef_tuple.h to include/base/cef_tuple.h. - Allow an empty |callback| parameter passed to CefBeginTracing. Changes to the CEF implementation: - Fix incorrect names passed to the IMPLEMENT_REFCOUNTING macro. - Fix instances of reentrant locking in the CefXmlObject and CefRequest implementations. - Remove use of the IMPLEMENT_LOCKING macro. Changes to cef_unittests: - Add tests/unittests/chromium_includes.h and always include it first from unit test .cc files to avoid name conflicts with Chromium types. - Fix wrong header include ordering. - Remove use of the IMPLEMENT_LOCKING macro. Changes to cefclient and cefsimple: - Use base::Bind and cef_closure_task.h instead of NewCefRunnable*. - Remove use of the IMPEMENT_LOCKING macro. - Fix incorrect/unnecessary locking. - Add additional runtime thread checks. - Windows: Perform actions on the UI thread instead of the main thread when running in multi-threaded-message-loop mode to avoid excessive locking. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1769 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
100
libcef_dll/base/cef_atomicops_x86_gcc.cc
Normal file
100
libcef_dll/base/cef_atomicops_x86_gcc.cc
Normal file
@@ -0,0 +1,100 @@
|
||||
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This module gets enough CPU information to optimize the
|
||||
// atomicops module on x86.
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "include/base/cef_atomicops.h"
|
||||
|
||||
// This file only makes sense with atomicops_internals_x86_gcc.h -- it
|
||||
// depends on structs that are defined in that file. If atomicops.h
|
||||
// doesn't sub-include that file, then we aren't needed, and shouldn't
|
||||
// try to do anything.
|
||||
#ifdef CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_X86_GCC_H_
|
||||
|
||||
// Inline cpuid instruction. In PIC compilations, %ebx contains the address
|
||||
// of the global offset table. To avoid breaking such executables, this code
|
||||
// must preserve that register's value across cpuid instructions.
|
||||
#if defined(__i386__)
|
||||
#define cpuid(a, b, c, d, inp) \
|
||||
asm("mov %%ebx, %%edi\n" \
|
||||
"cpuid\n" \
|
||||
"xchg %%edi, %%ebx\n" \
|
||||
: "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
|
||||
#elif defined(__x86_64__)
|
||||
#define cpuid(a, b, c, d, inp) \
|
||||
asm("mov %%rbx, %%rdi\n" \
|
||||
"cpuid\n" \
|
||||
"xchg %%rdi, %%rbx\n" \
|
||||
: "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
|
||||
#endif
|
||||
|
||||
#if defined(cpuid) // initialize the struct only on x86
|
||||
|
||||
// Set the flags so that code will run correctly and conservatively, so even
|
||||
// if we haven't been initialized yet, we're probably single threaded, and our
|
||||
// default values should hopefully be pretty safe.
|
||||
struct AtomicOps_x86CPUFeatureStruct AtomicOps_Internalx86CPUFeatures = {
|
||||
false, // bug can't exist before process spawns multiple threads
|
||||
};
|
||||
|
||||
namespace {
|
||||
|
||||
// Initialize the AtomicOps_Internalx86CPUFeatures struct.
|
||||
void AtomicOps_Internalx86CPUFeaturesInit() {
|
||||
uint32_t eax;
|
||||
uint32_t ebx;
|
||||
uint32_t ecx;
|
||||
uint32_t edx;
|
||||
|
||||
// Get vendor string (issue CPUID with eax = 0)
|
||||
cpuid(eax, ebx, ecx, edx, 0);
|
||||
char vendor[13];
|
||||
memcpy(vendor, &ebx, 4);
|
||||
memcpy(vendor + 4, &edx, 4);
|
||||
memcpy(vendor + 8, &ecx, 4);
|
||||
vendor[12] = 0;
|
||||
|
||||
// get feature flags in ecx/edx, and family/model in eax
|
||||
cpuid(eax, ebx, ecx, edx, 1);
|
||||
|
||||
int family = (eax >> 8) & 0xf; // family and model fields
|
||||
int model = (eax >> 4) & 0xf;
|
||||
if (family == 0xf) { // use extended family and model fields
|
||||
family += (eax >> 20) & 0xff;
|
||||
model += ((eax >> 16) & 0xf) << 4;
|
||||
}
|
||||
|
||||
// Opteron Rev E has a bug in which on very rare occasions a locked
|
||||
// instruction doesn't act as a read-acquire barrier if followed by a
|
||||
// non-locked read-modify-write instruction. Rev F has this bug in
|
||||
// pre-release versions, but not in versions released to customers,
|
||||
// so we test only for Rev E, which is family 15, model 32..63 inclusive.
|
||||
if (strcmp(vendor, "AuthenticAMD") == 0 && // AMD
|
||||
family == 15 &&
|
||||
32 <= model && model <= 63) {
|
||||
AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug = true;
|
||||
} else {
|
||||
AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug = false;
|
||||
}
|
||||
}
|
||||
|
||||
class AtomicOpsx86Initializer {
|
||||
public:
|
||||
AtomicOpsx86Initializer() {
|
||||
AtomicOps_Internalx86CPUFeaturesInit();
|
||||
}
|
||||
};
|
||||
|
||||
// A global to get use initialized on startup via static initialization :/
|
||||
AtomicOpsx86Initializer g_initer;
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif // if x86
|
||||
|
||||
#endif // ifdef CEF_INCLUDE_BASE_CEF_ATOMICOPS_INTERNALS_X86_GCC_H_
|
14
libcef_dll/base/cef_bind_helpers.cc
Normal file
14
libcef_dll/base/cef_bind_helpers.cc
Normal file
@@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "include/base/cef_bind_helpers.h"
|
||||
|
||||
#include "include/base/cef_callback.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
void DoNothing() {
|
||||
}
|
||||
|
||||
} // namespace base
|
42
libcef_dll/base/cef_callback_helpers.cc
Normal file
42
libcef_dll/base/cef_callback_helpers.cc
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright 2013 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "include/base/cef_callback_helpers.h"
|
||||
|
||||
#include "include/base/cef_callback.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
ScopedClosureRunner::ScopedClosureRunner() {
|
||||
}
|
||||
|
||||
ScopedClosureRunner::ScopedClosureRunner(const Closure& closure)
|
||||
: closure_(closure) {
|
||||
}
|
||||
|
||||
ScopedClosureRunner::~ScopedClosureRunner() {
|
||||
if (!closure_.is_null())
|
||||
closure_.Run();
|
||||
}
|
||||
|
||||
void ScopedClosureRunner::Reset() {
|
||||
Closure old_closure = Release();
|
||||
if (!old_closure.is_null())
|
||||
old_closure.Run();
|
||||
}
|
||||
|
||||
void ScopedClosureRunner::Reset(const Closure& closure) {
|
||||
Closure old_closure = Release();
|
||||
closure_ = closure;
|
||||
if (!old_closure.is_null())
|
||||
old_closure.Run();
|
||||
}
|
||||
|
||||
Closure ScopedClosureRunner::Release() {
|
||||
Closure result = closure_;
|
||||
closure_.Reset();
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace base
|
38
libcef_dll/base/cef_callback_internal.cc
Normal file
38
libcef_dll/base/cef_callback_internal.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "include/base/internal/cef_callback_internal.h"
|
||||
|
||||
#include "include/base/cef_logging.h"
|
||||
|
||||
namespace base {
|
||||
namespace internal {
|
||||
|
||||
bool CallbackBase::is_null() const {
|
||||
return bind_state_.get() == NULL;
|
||||
}
|
||||
|
||||
void CallbackBase::Reset() {
|
||||
polymorphic_invoke_ = NULL;
|
||||
// NULL the bind_state_ last, since it may be holding the last ref to whatever
|
||||
// object owns us, and we may be deleted after that.
|
||||
bind_state_ = NULL;
|
||||
}
|
||||
|
||||
bool CallbackBase::Equals(const CallbackBase& other) const {
|
||||
return bind_state_.get() == other.bind_state_.get() &&
|
||||
polymorphic_invoke_ == other.polymorphic_invoke_;
|
||||
}
|
||||
|
||||
CallbackBase::CallbackBase(BindStateBase* bind_state)
|
||||
: bind_state_(bind_state),
|
||||
polymorphic_invoke_(NULL) {
|
||||
DCHECK(!bind_state_.get() || bind_state_->HasOneRef());
|
||||
}
|
||||
|
||||
CallbackBase::~CallbackBase() {
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace base
|
44
libcef_dll/base/cef_lock.cc
Normal file
44
libcef_dll/base/cef_lock.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This file is used for debugging assertion support. The Lock class
|
||||
// is functionally a wrapper around the LockImpl class, so the only
|
||||
// real intelligence in the class is in the debugging logic.
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
|
||||
#include "include/base/cef_lock.h"
|
||||
#include "include/base/cef_logging.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
Lock::Lock() : lock_() {
|
||||
}
|
||||
|
||||
Lock::~Lock() {
|
||||
DCHECK(owning_thread_ref_.is_null());
|
||||
}
|
||||
|
||||
void Lock::AssertAcquired() const {
|
||||
DCHECK(owning_thread_ref_ == PlatformThread::CurrentRef());
|
||||
}
|
||||
|
||||
void Lock::CheckHeldAndUnmark() {
|
||||
DCHECK(owning_thread_ref_ == PlatformThread::CurrentRef());
|
||||
owning_thread_ref_ = PlatformThreadRef();
|
||||
}
|
||||
|
||||
void Lock::CheckUnheldAndMark() {
|
||||
// Hitting this DCHECK means that your code is trying to re-enter a lock that
|
||||
// is already held. The Chromium Lock implementation is not reentrant.
|
||||
// See "Why can the holder of a Lock not reacquire it?" at
|
||||
// http://www.chromium.org/developers/lock-and-condition-variable for more
|
||||
// information.
|
||||
DCHECK(owning_thread_ref_.is_null());
|
||||
owning_thread_ref_ = PlatformThread::CurrentRef();
|
||||
}
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // NDEBUG
|
92
libcef_dll/base/cef_lock_impl.cc
Normal file
92
libcef_dll/base/cef_lock_impl.cc
Normal file
@@ -0,0 +1,92 @@
|
||||
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "include/base/internal/cef_lock_impl.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
||||
namespace base {
|
||||
namespace internal {
|
||||
|
||||
LockImpl::LockImpl() {
|
||||
// The second parameter is the spin count, for short-held locks it avoid the
|
||||
// contending thread from going to sleep which helps performance greatly.
|
||||
::InitializeCriticalSectionAndSpinCount(&native_handle_, 2000);
|
||||
}
|
||||
|
||||
LockImpl::~LockImpl() {
|
||||
::DeleteCriticalSection(&native_handle_);
|
||||
}
|
||||
|
||||
bool LockImpl::Try() {
|
||||
if (::TryEnterCriticalSection(&native_handle_) != FALSE) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LockImpl::Lock() {
|
||||
::EnterCriticalSection(&native_handle_);
|
||||
}
|
||||
|
||||
void LockImpl::Unlock() {
|
||||
::LeaveCriticalSection(&native_handle_);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace base
|
||||
|
||||
#elif defined(OS_POSIX)
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "include/base/cef_logging.h"
|
||||
|
||||
namespace base {
|
||||
namespace internal {
|
||||
|
||||
LockImpl::LockImpl() {
|
||||
#ifndef NDEBUG
|
||||
// In debug, setup attributes for lock error checking.
|
||||
pthread_mutexattr_t mta;
|
||||
int rv = pthread_mutexattr_init(&mta);
|
||||
DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
||||
rv = pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK);
|
||||
DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
||||
rv = pthread_mutex_init(&native_handle_, &mta);
|
||||
DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
||||
rv = pthread_mutexattr_destroy(&mta);
|
||||
DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
||||
#else
|
||||
// In release, go with the default lock attributes.
|
||||
pthread_mutex_init(&native_handle_, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
LockImpl::~LockImpl() {
|
||||
int rv = pthread_mutex_destroy(&native_handle_);
|
||||
DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
||||
}
|
||||
|
||||
bool LockImpl::Try() {
|
||||
int rv = pthread_mutex_trylock(&native_handle_);
|
||||
DCHECK(rv == 0 || rv == EBUSY) << ". " << strerror(rv);
|
||||
return rv == 0;
|
||||
}
|
||||
|
||||
void LockImpl::Lock() {
|
||||
int rv = pthread_mutex_lock(&native_handle_);
|
||||
DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
||||
}
|
||||
|
||||
void LockImpl::Unlock() {
|
||||
int rv = pthread_mutex_unlock(&native_handle_);
|
||||
DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace base
|
||||
|
||||
#endif // defined(OS_POSIX)
|
@@ -17,7 +17,8 @@
|
||||
|
||||
#include "include/internal/cef_string_types.h"
|
||||
|
||||
namespace cef_logging {
|
||||
namespace cef {
|
||||
namespace logging {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -254,4 +255,5 @@ std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) {
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace cef_logging
|
||||
} // namespace logging
|
||||
} // namespace cef
|
||||
|
53
libcef_dll/base/cef_ref_counted.cc
Normal file
53
libcef_dll/base/cef_ref_counted.cc
Normal file
@@ -0,0 +1,53 @@
|
||||
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "include/base/cef_ref_counted.h"
|
||||
#include "include/base/cef_thread_collision_warner.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
namespace subtle {
|
||||
|
||||
bool RefCountedThreadSafeBase::HasOneRef() const {
|
||||
return AtomicRefCountIsOne(
|
||||
&const_cast<RefCountedThreadSafeBase*>(this)->ref_count_);
|
||||
}
|
||||
|
||||
RefCountedThreadSafeBase::RefCountedThreadSafeBase() : ref_count_(0) {
|
||||
#ifndef NDEBUG
|
||||
in_dtor_ = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
RefCountedThreadSafeBase::~RefCountedThreadSafeBase() {
|
||||
#ifndef NDEBUG
|
||||
DCHECK(in_dtor_) << "RefCountedThreadSafe object deleted without "
|
||||
"calling Release()";
|
||||
#endif
|
||||
}
|
||||
|
||||
void RefCountedThreadSafeBase::AddRef() const {
|
||||
#ifndef NDEBUG
|
||||
DCHECK(!in_dtor_);
|
||||
#endif
|
||||
AtomicRefCountInc(&ref_count_);
|
||||
}
|
||||
|
||||
bool RefCountedThreadSafeBase::Release() const {
|
||||
#ifndef NDEBUG
|
||||
DCHECK(!in_dtor_);
|
||||
DCHECK(!AtomicRefCountIsZero(&ref_count_));
|
||||
#endif
|
||||
if (!AtomicRefCountDec(&ref_count_)) {
|
||||
#ifndef NDEBUG
|
||||
in_dtor_ = true;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace subtle
|
||||
|
||||
} // namespace base
|
34
libcef_dll/base/cef_thread_checker_impl.cc
Normal file
34
libcef_dll/base/cef_thread_checker_impl.cc
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "include/base/internal/cef_thread_checker_impl.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
ThreadCheckerImpl::ThreadCheckerImpl()
|
||||
: valid_thread_id_() {
|
||||
EnsureThreadIdAssigned();
|
||||
}
|
||||
|
||||
ThreadCheckerImpl::~ThreadCheckerImpl() {}
|
||||
|
||||
bool ThreadCheckerImpl::CalledOnValidThread() const {
|
||||
EnsureThreadIdAssigned();
|
||||
AutoLock auto_lock(lock_);
|
||||
return valid_thread_id_ == PlatformThread::CurrentRef();
|
||||
}
|
||||
|
||||
void ThreadCheckerImpl::DetachFromThread() {
|
||||
AutoLock auto_lock(lock_);
|
||||
valid_thread_id_ = PlatformThreadRef();
|
||||
}
|
||||
|
||||
void ThreadCheckerImpl::EnsureThreadIdAssigned() const {
|
||||
AutoLock auto_lock(lock_);
|
||||
if (valid_thread_id_.is_null()) {
|
||||
valid_thread_id_ = PlatformThread::CurrentRef();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace base
|
65
libcef_dll/base/cef_thread_collision_warner.cc
Normal file
65
libcef_dll/base/cef_thread_collision_warner.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "include/base/cef_thread_collision_warner.h"
|
||||
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/internal/cef_thread_internal.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
void DCheckAsserter::warn() {
|
||||
NOTREACHED() << "Thread Collision";
|
||||
}
|
||||
|
||||
static subtle::Atomic32 CurrentThread() {
|
||||
const cef_platform_thread_id_t current_thread_id =
|
||||
cef_get_current_platform_thread_id();
|
||||
// We need to get the thread id into an atomic data type. This might be a
|
||||
// truncating conversion, but any loss-of-information just increases the
|
||||
// chance of a fault negative, not a false positive.
|
||||
const subtle::Atomic32 atomic_thread_id =
|
||||
static_cast<subtle::Atomic32>(current_thread_id);
|
||||
|
||||
return atomic_thread_id;
|
||||
}
|
||||
|
||||
void ThreadCollisionWarner::EnterSelf() {
|
||||
// If the active thread is 0 then I'll write the current thread ID
|
||||
// if two or more threads arrive here only one will succeed to
|
||||
// write on valid_thread_id_ the current thread ID.
|
||||
subtle::Atomic32 current_thread_id = CurrentThread();
|
||||
|
||||
int previous_value = subtle::NoBarrier_CompareAndSwap(&valid_thread_id_,
|
||||
0,
|
||||
current_thread_id);
|
||||
if (previous_value != 0 && previous_value != current_thread_id) {
|
||||
// gotcha! a thread is trying to use the same class and that is
|
||||
// not current thread.
|
||||
asserter_->warn();
|
||||
}
|
||||
|
||||
subtle::NoBarrier_AtomicIncrement(&counter_, 1);
|
||||
}
|
||||
|
||||
void ThreadCollisionWarner::Enter() {
|
||||
subtle::Atomic32 current_thread_id = CurrentThread();
|
||||
|
||||
if (subtle::NoBarrier_CompareAndSwap(&valid_thread_id_,
|
||||
0,
|
||||
current_thread_id) != 0) {
|
||||
// gotcha! another thread is trying to use the same class.
|
||||
asserter_->warn();
|
||||
}
|
||||
|
||||
subtle::NoBarrier_AtomicIncrement(&counter_, 1);
|
||||
}
|
||||
|
||||
void ThreadCollisionWarner::Leave() {
|
||||
if (subtle::Barrier_AtomicIncrement(&counter_, -1) == 0) {
|
||||
subtle::NoBarrier_Store(&valid_thread_id_, 0);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace base
|
77
libcef_dll/base/cef_weak_ptr.cc
Normal file
77
libcef_dll/base/cef_weak_ptr.cc
Normal file
@@ -0,0 +1,77 @@
|
||||
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "include/base/cef_weak_ptr.h"
|
||||
|
||||
namespace base {
|
||||
namespace internal {
|
||||
|
||||
WeakReference::Flag::Flag() : is_valid_(true) {
|
||||
// Flags only become bound when checked for validity, or invalidated,
|
||||
// so that we can check that later validity/invalidation operations on
|
||||
// the same Flag take place on the same thread.
|
||||
thread_checker_.DetachFromThread();
|
||||
}
|
||||
|
||||
void WeakReference::Flag::Invalidate() {
|
||||
// The flag being invalidated with a single ref implies that there are no
|
||||
// weak pointers in existence. Allow deletion on other thread in this case.
|
||||
DCHECK(thread_checker_.CalledOnValidThread() || HasOneRef())
|
||||
<< "WeakPtrs must be invalidated on the same thread.";
|
||||
is_valid_ = false;
|
||||
}
|
||||
|
||||
bool WeakReference::Flag::IsValid() const {
|
||||
DCHECK(thread_checker_.CalledOnValidThread())
|
||||
<< "WeakPtrs must be checked on the same thread.";
|
||||
return is_valid_;
|
||||
}
|
||||
|
||||
WeakReference::Flag::~Flag() {
|
||||
}
|
||||
|
||||
WeakReference::WeakReference() {
|
||||
}
|
||||
|
||||
WeakReference::WeakReference(const Flag* flag) : flag_(flag) {
|
||||
}
|
||||
|
||||
WeakReference::~WeakReference() {
|
||||
}
|
||||
|
||||
bool WeakReference::is_valid() const { return flag_.get() && flag_->IsValid(); }
|
||||
|
||||
WeakReferenceOwner::WeakReferenceOwner() {
|
||||
}
|
||||
|
||||
WeakReferenceOwner::~WeakReferenceOwner() {
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
WeakReference WeakReferenceOwner::GetRef() const {
|
||||
// If we hold the last reference to the Flag then create a new one.
|
||||
if (!HasRefs())
|
||||
flag_ = new WeakReference::Flag();
|
||||
|
||||
return WeakReference(flag_.get());
|
||||
}
|
||||
|
||||
void WeakReferenceOwner::Invalidate() {
|
||||
if (flag_.get()) {
|
||||
flag_->Invalidate();
|
||||
flag_ = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
WeakPtrBase::WeakPtrBase() {
|
||||
}
|
||||
|
||||
WeakPtrBase::~WeakPtrBase() {
|
||||
}
|
||||
|
||||
WeakPtrBase::WeakPtrBase(const WeakReference& ref) : ref_(ref) {
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace base
|
@@ -40,7 +40,7 @@ CefAllowCertificateErrorCallbackCppToC::CefAllowCertificateErrorCallbackCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefAllowCertificateErrorCallbackCppToC,
|
||||
template<> base::AtomicRefCount CefCppToC<CefAllowCertificateErrorCallbackCppToC,
|
||||
CefAllowCertificateErrorCallback,
|
||||
cef_allow_certificate_error_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -119,6 +119,7 @@ CefAppCppToC::CefAppCppToC(CefApp* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefAppCppToC, CefApp, cef_app_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefAppCppToC, CefApp,
|
||||
cef_app_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -59,7 +59,7 @@ CefAuthCallbackCppToC::CefAuthCallbackCppToC(CefAuthCallback* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefAuthCallbackCppToC, CefAuthCallback,
|
||||
cef_auth_callback_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefAuthCallbackCppToC,
|
||||
CefAuthCallback, cef_auth_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -78,7 +78,7 @@ class CefBaseCppToC : public CefBase {
|
||||
struct_.struct_.size = sizeof(cef_base_t);
|
||||
struct_.struct_.add_ref = struct_add_ref;
|
||||
struct_.struct_.release = struct_release;
|
||||
struct_.struct_.get_refct = struct_get_refct;
|
||||
struct_.struct_.has_one_ref = struct_has_one_ref;
|
||||
}
|
||||
virtual ~CefBaseCppToC() {}
|
||||
|
||||
@@ -91,32 +91,33 @@ class CefBaseCppToC : public CefBase {
|
||||
|
||||
// CefBase methods increment/decrement reference counts on both this object
|
||||
// and the underlying wrapper class.
|
||||
int AddRef() {
|
||||
void AddRef() const {
|
||||
UnderlyingAddRef();
|
||||
return refct_.AddRef();
|
||||
ref_count_.AddRef();
|
||||
}
|
||||
int Release() {
|
||||
bool Release() const {
|
||||
UnderlyingRelease();
|
||||
int retval = refct_.Release();
|
||||
if (retval == 0)
|
||||
if (ref_count_.Release()) {
|
||||
delete this;
|
||||
return retval;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
int GetRefCt() { return refct_.GetRefCt(); }
|
||||
bool HasOneRef() const { return ref_count_.HasOneRef(); }
|
||||
|
||||
// Increment/decrement reference counts on only the underlying class.
|
||||
int UnderlyingAddRef() { return class_->AddRef(); }
|
||||
int UnderlyingRelease() { return class_->Release(); }
|
||||
int UnderlyingGetRefCt() { return class_->GetRefCt(); }
|
||||
void UnderlyingAddRef() const { class_->AddRef(); }
|
||||
bool UnderlyingRelease() const { return class_->Release(); }
|
||||
bool UnderlyingHasOneRef() const { return class_->HasOneRef(); }
|
||||
|
||||
private:
|
||||
static int CEF_CALLBACK struct_add_ref(struct _cef_base_t* base) {
|
||||
static void CEF_CALLBACK struct_add_ref(struct _cef_base_t* base) {
|
||||
DCHECK(base);
|
||||
if (!base)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
Struct* impl = reinterpret_cast<Struct*>(base);
|
||||
return impl->class_->AddRef();
|
||||
impl->class_->AddRef();
|
||||
}
|
||||
|
||||
static int CEF_CALLBACK struct_release(struct _cef_base_t* base) {
|
||||
@@ -128,16 +129,16 @@ class CefBaseCppToC : public CefBase {
|
||||
return impl->class_->Release();
|
||||
}
|
||||
|
||||
static int CEF_CALLBACK struct_get_refct(struct _cef_base_t* base) {
|
||||
static int CEF_CALLBACK struct_has_one_ref(struct _cef_base_t* base) {
|
||||
DCHECK(base);
|
||||
if (!base)
|
||||
return 0;
|
||||
|
||||
Struct* impl = reinterpret_cast<Struct*>(base);
|
||||
return impl->class_->GetRefCt();
|
||||
return impl->class_->HasOneRef();
|
||||
}
|
||||
|
||||
CefRefCount refct_;
|
||||
CefRefCount ref_count_;
|
||||
Struct struct_;
|
||||
CefBase* class_;
|
||||
|
||||
|
@@ -42,7 +42,7 @@ CefBeforeDownloadCallbackCppToC::CefBeforeDownloadCallbackCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefBeforeDownloadCallbackCppToC,
|
||||
template<> base::AtomicRefCount CefCppToC<CefBeforeDownloadCallbackCppToC,
|
||||
CefBeforeDownloadCallback, cef_before_download_callback_t>::DebugObjCt =
|
||||
0;
|
||||
#endif
|
||||
|
@@ -128,7 +128,7 @@ CefBinaryValueCppToC::CefBinaryValueCppToC(CefBinaryValue* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefBinaryValueCppToC, CefBinaryValue,
|
||||
template<> base::AtomicRefCount CefCppToC<CefBinaryValueCppToC, CefBinaryValue,
|
||||
cef_binary_value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -384,7 +384,7 @@ CefBrowserCppToC::CefBrowserCppToC(CefBrowser* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefBrowserCppToC, CefBrowser,
|
||||
template<> base::AtomicRefCount CefCppToC<CefBrowserCppToC, CefBrowser,
|
||||
cef_browser_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -812,7 +812,7 @@ CefBrowserHostCppToC::CefBrowserHostCppToC(CefBrowserHost* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefBrowserHostCppToC, CefBrowserHost,
|
||||
template<> base::AtomicRefCount CefCppToC<CefBrowserHostCppToC, CefBrowserHost,
|
||||
cef_browser_host_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -99,7 +99,7 @@ CefBrowserProcessHandlerCppToC::CefBrowserProcessHandlerCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefBrowserProcessHandlerCppToC,
|
||||
template<> base::AtomicRefCount CefCppToC<CefBrowserProcessHandlerCppToC,
|
||||
CefBrowserProcessHandler, cef_browser_process_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -47,7 +47,7 @@ CefCallbackCppToC::CefCallbackCppToC(CefCallback* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefCallbackCppToC, CefCallback,
|
||||
template<> base::AtomicRefCount CefCppToC<CefCallbackCppToC, CefCallback,
|
||||
cef_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -288,7 +288,7 @@ CefClientCppToC::CefClientCppToC(CefClient* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefClientCppToC, CefClient,
|
||||
template<> base::AtomicRefCount CefCppToC<CefClientCppToC, CefClient,
|
||||
cef_client_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -422,7 +422,7 @@ CefCommandLineCppToC::CefCommandLineCppToC(CefCommandLine* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefCommandLineCppToC, CefCommandLine,
|
||||
template<> base::AtomicRefCount CefCppToC<CefCommandLineCppToC, CefCommandLine,
|
||||
cef_command_line_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -38,7 +38,7 @@ CefCompletionCallbackCppToC::CefCompletionCallbackCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefCompletionCallbackCppToC, CefCompletionCallback,
|
||||
cef_completion_callback_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefCompletionCallbackCppToC,
|
||||
CefCompletionCallback, cef_completion_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -126,7 +126,7 @@ CefContextMenuHandlerCppToC::CefContextMenuHandlerCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefContextMenuHandlerCppToC, CefContextMenuHandler,
|
||||
cef_context_menu_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefContextMenuHandlerCppToC,
|
||||
CefContextMenuHandler, cef_context_menu_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -273,7 +273,7 @@ CefContextMenuParamsCppToC::CefContextMenuParamsCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefContextMenuParamsCppToC, CefContextMenuParams,
|
||||
cef_context_menu_params_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefContextMenuParamsCppToC,
|
||||
CefContextMenuParams, cef_context_menu_params_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -219,7 +219,7 @@ CefCookieManagerCppToC::CefCookieManagerCppToC(CefCookieManager* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefCookieManagerCppToC, CefCookieManager,
|
||||
cef_cookie_manager_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefCookieManagerCppToC,
|
||||
CefCookieManager, cef_cookie_manager_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -64,7 +64,7 @@ CefCookieVisitorCppToC::CefCookieVisitorCppToC(CefCookieVisitor* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefCookieVisitorCppToC, CefCookieVisitor,
|
||||
cef_cookie_visitor_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefCookieVisitorCppToC,
|
||||
CefCookieVisitor, cef_cookie_visitor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -80,15 +80,15 @@ class CefCppToC : public CefBase {
|
||||
struct_.struct_.base.size = sizeof(StructName);
|
||||
struct_.struct_.base.add_ref = struct_add_ref;
|
||||
struct_.struct_.base.release = struct_release;
|
||||
struct_.struct_.base.get_refct = struct_get_refct;
|
||||
struct_.struct_.base.has_one_ref = struct_has_one_ref;
|
||||
|
||||
#ifndef NDEBUG
|
||||
CefAtomicIncrement(&DebugObjCt);
|
||||
base::AtomicRefCountInc(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
virtual ~CefCppToC() {
|
||||
#ifndef NDEBUG
|
||||
CefAtomicDecrement(&DebugObjCt);
|
||||
base::AtomicRefCountDec(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -101,42 +101,42 @@ class CefCppToC : public CefBase {
|
||||
|
||||
// CefBase methods increment/decrement reference counts on both this object
|
||||
// and the underlying wrapper class.
|
||||
int AddRef() {
|
||||
void AddRef() const {
|
||||
UnderlyingAddRef();
|
||||
return refct_.AddRef();
|
||||
ref_count_.AddRef();
|
||||
}
|
||||
int Release() {
|
||||
bool Release() const {
|
||||
UnderlyingRelease();
|
||||
int retval = refct_.Release();
|
||||
if (retval == 0)
|
||||
if (ref_count_.Release()) {
|
||||
delete this;
|
||||
return retval;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
int GetRefCt() { return refct_.GetRefCt(); }
|
||||
bool HasOneRef() const { return ref_count_.HasOneRef(); }
|
||||
|
||||
// Increment/decrement reference counts on only the underlying class.
|
||||
int UnderlyingAddRef() { return class_->AddRef(); }
|
||||
int UnderlyingRelease() { return class_->Release(); }
|
||||
int UnderlyingGetRefCt() { return class_->GetRefCt(); }
|
||||
void UnderlyingAddRef() const { class_->AddRef(); }
|
||||
bool UnderlyingRelease() const { return class_->Release(); }
|
||||
bool UnderlyingHasOneRef() const { return class_->HasOneRef(); }
|
||||
|
||||
#ifndef NDEBUG
|
||||
// Simple tracking of allocated objects.
|
||||
static long DebugObjCt; // NOLINT(runtime/int)
|
||||
static base::AtomicRefCount DebugObjCt; // NOLINT(runtime/int)
|
||||
#endif
|
||||
|
||||
protected:
|
||||
CefRefCount refct_;
|
||||
Struct struct_;
|
||||
BaseName* class_;
|
||||
|
||||
private:
|
||||
static int CEF_CALLBACK struct_add_ref(struct _cef_base_t* base) {
|
||||
static void CEF_CALLBACK struct_add_ref(struct _cef_base_t* base) {
|
||||
DCHECK(base);
|
||||
if (!base)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
Struct* impl = reinterpret_cast<Struct*>(base);
|
||||
return impl->class_->AddRef();
|
||||
impl->class_->AddRef();
|
||||
}
|
||||
|
||||
static int CEF_CALLBACK struct_release(struct _cef_base_t* base) {
|
||||
@@ -148,15 +148,17 @@ class CefCppToC : public CefBase {
|
||||
return impl->class_->Release();
|
||||
}
|
||||
|
||||
static int CEF_CALLBACK struct_get_refct(struct _cef_base_t* base) {
|
||||
static int CEF_CALLBACK struct_has_one_ref(struct _cef_base_t* base) {
|
||||
DCHECK(base);
|
||||
if (!base)
|
||||
return 0;
|
||||
|
||||
Struct* impl = reinterpret_cast<Struct*>(base);
|
||||
return impl->class_->GetRefCt();
|
||||
return impl->class_->HasOneRef();
|
||||
}
|
||||
|
||||
CefRefCount ref_count_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefCppToC);
|
||||
};
|
||||
|
||||
|
@@ -65,7 +65,7 @@ CefDialogHandlerCppToC::CefDialogHandlerCppToC(CefDialogHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDialogHandlerCppToC, CefDialogHandler,
|
||||
cef_dialog_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefDialogHandlerCppToC,
|
||||
CefDialogHandler, cef_dialog_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -571,7 +571,7 @@ CefDictionaryValueCppToC::CefDictionaryValueCppToC(CefDictionaryValue* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDictionaryValueCppToC, CefDictionaryValue,
|
||||
cef_dictionary_value_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefDictionaryValueCppToC,
|
||||
CefDictionaryValue, cef_dictionary_value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -149,7 +149,7 @@ CefDisplayHandlerCppToC::CefDisplayHandlerCppToC(CefDisplayHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDisplayHandlerCppToC, CefDisplayHandler,
|
||||
cef_display_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefDisplayHandlerCppToC,
|
||||
CefDisplayHandler, cef_display_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -297,7 +297,7 @@ CefDOMDocumentCppToC::CefDOMDocumentCppToC(CefDOMDocument* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDOMDocumentCppToC, CefDOMDocument,
|
||||
template<> base::AtomicRefCount CefCppToC<CefDOMDocumentCppToC, CefDOMDocument,
|
||||
cef_domdocument_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -153,7 +153,7 @@ CefDOMEventCppToC::CefDOMEventCppToC(CefDOMEvent* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDOMEventCppToC, CefDOMEvent,
|
||||
template<> base::AtomicRefCount CefCppToC<CefDOMEventCppToC, CefDOMEvent,
|
||||
cef_domevent_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -43,7 +43,7 @@ CefDOMEventListenerCppToC::CefDOMEventListenerCppToC(CefDOMEventListener* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDOMEventListenerCppToC, CefDOMEventListener,
|
||||
cef_domevent_listener_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefDOMEventListenerCppToC,
|
||||
CefDOMEventListener, cef_domevent_listener_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -487,7 +487,7 @@ CefDOMNodeCppToC::CefDOMNodeCppToC(CefDOMNode* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDOMNodeCppToC, CefDOMNode,
|
||||
template<> base::AtomicRefCount CefCppToC<CefDOMNodeCppToC, CefDOMNode,
|
||||
cef_domnode_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -42,7 +42,7 @@ CefDOMVisitorCppToC::CefDOMVisitorCppToC(CefDOMVisitor* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor,
|
||||
template<> base::AtomicRefCount CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor,
|
||||
cef_domvisitor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -94,7 +94,7 @@ CefDownloadHandlerCppToC::CefDownloadHandlerCppToC(CefDownloadHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDownloadHandlerCppToC, CefDownloadHandler,
|
||||
cef_download_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefDownloadHandlerCppToC,
|
||||
CefDownloadHandler, cef_download_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -38,7 +38,7 @@ CefDownloadItemCallbackCppToC::CefDownloadItemCallbackCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDownloadItemCallbackCppToC,
|
||||
template<> base::AtomicRefCount CefCppToC<CefDownloadItemCallbackCppToC,
|
||||
CefDownloadItemCallback, cef_download_item_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -278,7 +278,7 @@ CefDownloadItemCppToC::CefDownloadItemCppToC(CefDownloadItem* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDownloadItemCppToC, CefDownloadItem,
|
||||
cef_download_item_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefDownloadItemCppToC,
|
||||
CefDownloadItem, cef_download_item_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -395,7 +395,7 @@ CefDragDataCppToC::CefDragDataCppToC(CefDragData* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDragDataCppToC, CefDragData,
|
||||
template<> base::AtomicRefCount CefCppToC<CefDragDataCppToC, CefDragData,
|
||||
cef_drag_data_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -53,7 +53,7 @@ CefDragHandlerCppToC::CefDragHandlerCppToC(CefDragHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefDragHandlerCppToC, CefDragHandler,
|
||||
template<> base::AtomicRefCount CefCppToC<CefDragHandlerCppToC, CefDragHandler,
|
||||
cef_drag_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -45,7 +45,7 @@ CefEndTracingCallbackCppToC::CefEndTracingCallbackCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefEndTracingCallbackCppToC, CefEndTracingCallback,
|
||||
cef_end_tracing_callback_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefEndTracingCallbackCppToC,
|
||||
CefEndTracingCallback, cef_end_tracing_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -61,7 +61,7 @@ CefFileDialogCallbackCppToC::CefFileDialogCallbackCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefFileDialogCallbackCppToC, CefFileDialogCallback,
|
||||
cef_file_dialog_callback_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefFileDialogCallbackCppToC,
|
||||
CefFileDialogCallback, cef_file_dialog_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -84,7 +84,7 @@ CefFocusHandlerCppToC::CefFocusHandlerCppToC(CefFocusHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefFocusHandlerCppToC, CefFocusHandler,
|
||||
cef_focus_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefFocusHandlerCppToC,
|
||||
CefFocusHandler, cef_focus_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -395,7 +395,7 @@ CefFrameCppToC::CefFrameCppToC(CefFrame* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefFrameCppToC, CefFrame, cef_frame_t>::DebugObjCt =
|
||||
0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefFrameCppToC, CefFrame,
|
||||
cef_frame_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -39,7 +39,7 @@ CefGeolocationCallbackCppToC::CefGeolocationCallbackCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefGeolocationCallbackCppToC, CefGeolocationCallback,
|
||||
cef_geolocation_callback_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefGeolocationCallbackCppToC,
|
||||
CefGeolocationCallback, cef_geolocation_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -89,7 +89,7 @@ CefGeolocationHandlerCppToC::CefGeolocationHandlerCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefGeolocationHandlerCppToC, CefGeolocationHandler,
|
||||
cef_geolocation_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefGeolocationHandlerCppToC,
|
||||
CefGeolocationHandler, cef_geolocation_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -50,7 +50,7 @@ CefGetGeolocationCallbackCppToC::CefGetGeolocationCallbackCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefGetGeolocationCallbackCppToC,
|
||||
template<> base::AtomicRefCount CefCppToC<CefGetGeolocationCallbackCppToC,
|
||||
CefGetGeolocationCallback, cef_get_geolocation_callback_t>::DebugObjCt =
|
||||
0;
|
||||
#endif
|
||||
|
@@ -40,7 +40,7 @@ CefJSDialogCallbackCppToC::CefJSDialogCallbackCppToC(CefJSDialogCallback* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefJSDialogCallbackCppToC, CefJSDialogCallback,
|
||||
cef_jsdialog_callback_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefJSDialogCallbackCppToC,
|
||||
CefJSDialogCallback, cef_jsdialog_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -145,7 +145,7 @@ CefJSDialogHandlerCppToC::CefJSDialogHandlerCppToC(CefJSDialogHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefJSDialogHandlerCppToC, CefJSDialogHandler,
|
||||
cef_jsdialog_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefJSDialogHandlerCppToC,
|
||||
CefJSDialogHandler, cef_jsdialog_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -104,7 +104,7 @@ CefKeyboardHandlerCppToC::CefKeyboardHandlerCppToC(CefKeyboardHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefKeyboardHandlerCppToC, CefKeyboardHandler,
|
||||
cef_keyboard_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefKeyboardHandlerCppToC,
|
||||
CefKeyboardHandler, cef_keyboard_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -205,7 +205,7 @@ CefLifeSpanHandlerCppToC::CefLifeSpanHandlerCppToC(CefLifeSpanHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefLifeSpanHandlerCppToC, CefLifeSpanHandler,
|
||||
cef_life_span_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefLifeSpanHandlerCppToC,
|
||||
CefLifeSpanHandler, cef_life_span_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -522,7 +522,7 @@ CefListValueCppToC::CefListValueCppToC(CefListValue* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefListValueCppToC, CefListValue,
|
||||
template<> base::AtomicRefCount CefCppToC<CefListValueCppToC, CefListValue,
|
||||
cef_list_value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -127,7 +127,7 @@ CefLoadHandlerCppToC::CefLoadHandlerCppToC(CefLoadHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefLoadHandlerCppToC, CefLoadHandler,
|
||||
template<> base::AtomicRefCount CefCppToC<CefLoadHandlerCppToC, CefLoadHandler,
|
||||
cef_load_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -1014,7 +1014,7 @@ CefMenuModelCppToC::CefMenuModelCppToC(CefMenuModel* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefMenuModelCppToC, CefMenuModel,
|
||||
template<> base::AtomicRefCount CefCppToC<CefMenuModelCppToC, CefMenuModel,
|
||||
cef_menu_model_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -158,7 +158,7 @@ CefPostDataCppToC::CefPostDataCppToC(CefPostData* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefPostDataCppToC, CefPostData,
|
||||
template<> base::AtomicRefCount CefCppToC<CefPostDataCppToC, CefPostData,
|
||||
cef_post_data_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -174,7 +174,7 @@ CefPostDataElementCppToC::CefPostDataElementCppToC(CefPostDataElement* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefPostDataElementCppToC, CefPostDataElement,
|
||||
cef_post_data_element_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefPostDataElementCppToC,
|
||||
CefPostDataElement, cef_post_data_element_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -58,7 +58,7 @@ CefPrintDialogCallbackCppToC::CefPrintDialogCallbackCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefPrintDialogCallbackCppToC, CefPrintDialogCallback,
|
||||
cef_print_dialog_callback_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefPrintDialogCallbackCppToC,
|
||||
CefPrintDialogCallback, cef_print_dialog_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -115,7 +115,7 @@ CefPrintHandlerCppToC::CefPrintHandlerCppToC(CefPrintHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefPrintHandlerCppToC, CefPrintHandler,
|
||||
cef_print_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefPrintHandlerCppToC,
|
||||
CefPrintHandler, cef_print_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -37,7 +37,7 @@ CefPrintJobCallbackCppToC::CefPrintJobCallbackCppToC(CefPrintJobCallback* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefPrintJobCallbackCppToC, CefPrintJobCallback,
|
||||
cef_print_job_callback_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefPrintJobCallbackCppToC,
|
||||
CefPrintJobCallback, cef_print_job_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -441,7 +441,7 @@ CefPrintSettingsCppToC::CefPrintSettingsCppToC(CefPrintSettings* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefPrintSettingsCppToC, CefPrintSettings,
|
||||
cef_print_settings_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefPrintSettingsCppToC,
|
||||
CefPrintSettings, cef_print_settings_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -126,7 +126,7 @@ CefProcessMessageCppToC::CefProcessMessageCppToC(CefProcessMessage* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefProcessMessageCppToC, CefProcessMessage,
|
||||
cef_process_message_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefProcessMessageCppToC,
|
||||
CefProcessMessage, cef_process_message_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -50,7 +50,7 @@ CefQuotaCallbackCppToC::CefQuotaCallbackCppToC(CefQuotaCallback* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefQuotaCallbackCppToC, CefQuotaCallback,
|
||||
cef_quota_callback_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefQuotaCallbackCppToC,
|
||||
CefQuotaCallback, cef_quota_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -109,7 +109,7 @@ CefReadHandlerCppToC::CefReadHandlerCppToC(CefReadHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefReadHandlerCppToC, CefReadHandler,
|
||||
template<> base::AtomicRefCount CefCppToC<CefReadHandlerCppToC, CefReadHandler,
|
||||
cef_read_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -353,7 +353,7 @@ CefRenderHandlerCppToC::CefRenderHandlerCppToC(CefRenderHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefRenderHandlerCppToC, CefRenderHandler,
|
||||
cef_render_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefRenderHandlerCppToC,
|
||||
CefRenderHandler, cef_render_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -315,7 +315,7 @@ CefRenderProcessHandlerCppToC::CefRenderProcessHandlerCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefRenderProcessHandlerCppToC,
|
||||
template<> base::AtomicRefCount CefCppToC<CefRenderProcessHandlerCppToC,
|
||||
CefRenderProcessHandler, cef_render_process_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -106,7 +106,7 @@ CefRequestContextCppToC::CefRequestContextCppToC(CefRequestContext* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefRequestContextCppToC, CefRequestContext,
|
||||
cef_request_context_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefRequestContextCppToC,
|
||||
CefRequestContext, cef_request_context_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -44,7 +44,7 @@ CefRequestContextHandlerCppToC::CefRequestContextHandlerCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefRequestContextHandlerCppToC,
|
||||
template<> base::AtomicRefCount CefCppToC<CefRequestContextHandlerCppToC,
|
||||
CefRequestContextHandler, cef_request_context_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -335,7 +335,7 @@ CefRequestCppToC::CefRequestCppToC(CefRequest* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefRequestCppToC, CefRequest,
|
||||
template<> base::AtomicRefCount CefCppToC<CefRequestCppToC, CefRequest,
|
||||
cef_request_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -392,7 +392,7 @@ CefRequestHandlerCppToC::CefRequestHandlerCppToC(CefRequestHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefRequestHandlerCppToC, CefRequestHandler,
|
||||
cef_request_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefRequestHandlerCppToC,
|
||||
CefRequestHandler, cef_request_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -92,7 +92,7 @@ CefResourceBundleHandlerCppToC::CefResourceBundleHandlerCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefResourceBundleHandlerCppToC,
|
||||
template<> base::AtomicRefCount CefCppToC<CefResourceBundleHandlerCppToC,
|
||||
CefResourceBundleHandler, cef_resource_bundle_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -197,7 +197,7 @@ CefResourceHandlerCppToC::CefResourceHandlerCppToC(CefResourceHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefResourceHandlerCppToC, CefResourceHandler,
|
||||
cef_resource_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefResourceHandlerCppToC,
|
||||
CefResourceHandler, cef_resource_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -218,7 +218,7 @@ CefResponseCppToC::CefResponseCppToC(CefResponse* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefResponseCppToC, CefResponse,
|
||||
template<> base::AtomicRefCount CefCppToC<CefResponseCppToC, CefResponse,
|
||||
cef_response_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -55,7 +55,7 @@ CefRunFileDialogCallbackCppToC::CefRunFileDialogCallbackCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefRunFileDialogCallbackCppToC,
|
||||
template<> base::AtomicRefCount CefCppToC<CefRunFileDialogCallbackCppToC,
|
||||
CefRunFileDialogCallback, cef_run_file_dialog_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -61,7 +61,7 @@ CefSchemeHandlerFactoryCppToC::CefSchemeHandlerFactoryCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefSchemeHandlerFactoryCppToC,
|
||||
template<> base::AtomicRefCount CefCppToC<CefSchemeHandlerFactoryCppToC,
|
||||
CefSchemeHandlerFactory, cef_scheme_handler_factory_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -49,7 +49,7 @@ CefSchemeRegistrarCppToC::CefSchemeRegistrarCppToC(CefSchemeRegistrar* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefSchemeRegistrarCppToC, CefSchemeRegistrar,
|
||||
cef_scheme_registrar_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefSchemeRegistrarCppToC,
|
||||
CefSchemeRegistrar, cef_scheme_registrar_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -166,7 +166,7 @@ CefStreamReaderCppToC::CefStreamReaderCppToC(CefStreamReader* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefStreamReaderCppToC, CefStreamReader,
|
||||
cef_stream_reader_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefStreamReaderCppToC,
|
||||
CefStreamReader, cef_stream_reader_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -148,7 +148,7 @@ CefStreamWriterCppToC::CefStreamWriterCppToC(CefStreamWriter* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefStreamWriterCppToC, CefStreamWriter,
|
||||
cef_stream_writer_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefStreamWriterCppToC,
|
||||
CefStreamWriter, cef_stream_writer_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -39,7 +39,7 @@ CefStringVisitorCppToC::CefStringVisitorCppToC(CefStringVisitor* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefStringVisitorCppToC, CefStringVisitor,
|
||||
cef_string_visitor_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefStringVisitorCppToC,
|
||||
CefStringVisitor, cef_string_visitor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -35,6 +35,7 @@ CefTaskCppToC::CefTaskCppToC(CefTask* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefTaskCppToC, CefTask, cef_task_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefTaskCppToC, CefTask,
|
||||
cef_task_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -147,7 +147,7 @@ CefTaskRunnerCppToC::CefTaskRunnerCppToC(CefTaskRunner* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefTaskRunnerCppToC, CefTaskRunner,
|
||||
template<> base::AtomicRefCount CefCppToC<CefTaskRunnerCppToC, CefTaskRunner,
|
||||
cef_task_runner_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -148,7 +148,7 @@ CefURLRequestClientCppToC::CefURLRequestClientCppToC(CefURLRequestClient* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefURLRequestClientCppToC, CefURLRequestClient,
|
||||
cef_urlrequest_client_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefURLRequestClientCppToC,
|
||||
CefURLRequestClient, cef_urlrequest_client_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -146,7 +146,7 @@ CefURLRequestCppToC::CefURLRequestCppToC(CefURLRequest* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefURLRequestCppToC, CefURLRequest,
|
||||
template<> base::AtomicRefCount CefCppToC<CefURLRequestCppToC, CefURLRequest,
|
||||
cef_urlrequest_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -120,7 +120,7 @@ CefV8AccessorCppToC::CefV8AccessorCppToC(CefV8Accessor* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefV8AccessorCppToC, CefV8Accessor,
|
||||
template<> base::AtomicRefCount CefCppToC<CefV8AccessorCppToC, CefV8Accessor,
|
||||
cef_v8accessor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -255,7 +255,7 @@ CefV8ContextCppToC::CefV8ContextCppToC(CefV8Context* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefV8ContextCppToC, CefV8Context,
|
||||
template<> base::AtomicRefCount CefCppToC<CefV8ContextCppToC, CefV8Context,
|
||||
cef_v8context_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -148,7 +148,7 @@ CefV8ExceptionCppToC::CefV8ExceptionCppToC(CefV8Exception* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefV8ExceptionCppToC, CefV8Exception,
|
||||
template<> base::AtomicRefCount CefCppToC<CefV8ExceptionCppToC, CefV8Exception,
|
||||
cef_v8exception_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -93,7 +93,7 @@ CefV8HandlerCppToC::CefV8HandlerCppToC(CefV8Handler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefV8HandlerCppToC, CefV8Handler,
|
||||
template<> base::AtomicRefCount CefCppToC<CefV8HandlerCppToC, CefV8Handler,
|
||||
cef_v8handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -151,7 +151,7 @@ CefV8StackFrameCppToC::CefV8StackFrameCppToC(CefV8StackFrame* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefV8StackFrameCppToC, CefV8StackFrame,
|
||||
cef_v8stack_frame_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefV8StackFrameCppToC,
|
||||
CefV8StackFrame, cef_v8stack_frame_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -88,7 +88,7 @@ CefV8StackTraceCppToC::CefV8StackTraceCppToC(CefV8StackTrace* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefV8StackTraceCppToC, CefV8StackTrace,
|
||||
cef_v8stack_trace_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefV8StackTraceCppToC,
|
||||
CefV8StackTrace, cef_v8stack_trace_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -967,7 +967,7 @@ CefV8ValueCppToC::CefV8ValueCppToC(CefV8Value* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefV8ValueCppToC, CefV8Value,
|
||||
template<> base::AtomicRefCount CefCppToC<CefV8ValueCppToC, CefV8Value,
|
||||
cef_v8value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -88,7 +88,7 @@ CefWebPluginInfoCppToC::CefWebPluginInfoCppToC(CefWebPluginInfo* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefWebPluginInfoCppToC, CefWebPluginInfo,
|
||||
cef_web_plugin_info_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefWebPluginInfoCppToC,
|
||||
CefWebPluginInfo, cef_web_plugin_info_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -50,7 +50,7 @@ CefWebPluginInfoVisitorCppToC::CefWebPluginInfoVisitorCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefWebPluginInfoVisitorCppToC,
|
||||
template<> base::AtomicRefCount CefCppToC<CefWebPluginInfoVisitorCppToC,
|
||||
CefWebPluginInfoVisitor, cef_web_plugin_info_visitor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -46,7 +46,7 @@ CefWebPluginUnstableCallbackCppToC::CefWebPluginUnstableCallbackCppToC(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefWebPluginUnstableCallbackCppToC,
|
||||
template<> base::AtomicRefCount CefCppToC<CefWebPluginUnstableCallbackCppToC,
|
||||
CefWebPluginUnstableCallback,
|
||||
cef_web_plugin_unstable_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -110,7 +110,7 @@ CefWriteHandlerCppToC::CefWriteHandlerCppToC(CefWriteHandler* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefWriteHandlerCppToC, CefWriteHandler,
|
||||
cef_write_handler_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCppToC<CefWriteHandlerCppToC,
|
||||
CefWriteHandler, cef_write_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -552,7 +552,7 @@ CefXmlReaderCppToC::CefXmlReaderCppToC(CefXmlReader* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefXmlReaderCppToC, CefXmlReader,
|
||||
template<> base::AtomicRefCount CefCppToC<CefXmlReaderCppToC, CefXmlReader,
|
||||
cef_xml_reader_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -243,7 +243,7 @@ CefZipReaderCppToC::CefZipReaderCppToC(CefZipReader* cls)
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefZipReaderCppToC, CefZipReader,
|
||||
template<> base::AtomicRefCount CefCppToC<CefZipReaderCppToC, CefZipReader,
|
||||
cef_zip_reader_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -28,7 +28,7 @@ void CefAllowCertificateErrorCallbackCToCpp::Continue(bool allow) {
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefAllowCertificateErrorCallbackCToCpp,
|
||||
template<> base::AtomicRefCount CefCToCpp<CefAllowCertificateErrorCallbackCToCpp,
|
||||
CefAllowCertificateErrorCallback,
|
||||
cef_allow_certificate_error_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -100,6 +100,7 @@ CefRefPtr<CefRenderProcessHandler> CefAppCToCpp::GetRenderProcessHandler() {
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefAppCToCpp, CefApp, cef_app_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCToCpp<CefAppCToCpp, CefApp,
|
||||
cef_app_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -49,7 +49,7 @@ void CefAuthCallbackCToCpp::Cancel() {
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefAuthCallbackCToCpp, CefAuthCallback,
|
||||
cef_auth_callback_t>::DebugObjCt = 0;
|
||||
template<> base::AtomicRefCount CefCToCpp<CefAuthCallbackCToCpp,
|
||||
CefAuthCallback, cef_auth_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user