Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit a18fe93

Browse files
authored
Merge pull request #112 from livecode/update-cef
[[ CEF ]] Update CEF
2 parents dc36912 + 1b6cddd commit a18fe93

File tree

560 files changed

+35565
-16606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

560 files changed

+35565
-16606
lines changed

libcef/gen_libcef_stubs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"cef_thread_id_t":"integer",
2929
"cef_uri_unescape_rule_t":"integer",
3030
"cef_xml_encoding_type_t":"integer",
31+
"cef_cert_status_t": "integer",
3132
}
3233

3334
def log(pMsg):

libcef/include/base/cef_atomic_ref_count.h

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,49 @@
3939
#define CEF_INCLUDE_BASE_CEF_ATOMIC_REF_COUNT_H_
4040
#pragma once
4141

42-
#if defined(BASE_ATOMIC_REF_COUNT_H_)
43-
// Do nothing if the Chromium header has already been included.
44-
// This can happen in cases where Chromium code is used directly by the
45-
// client application. When using Chromium code directly always include
46-
// the Chromium header first to avoid type conflicts.
47-
#elif defined(USING_CHROMIUM_INCLUDES)
42+
#if defined(USING_CHROMIUM_INCLUDES)
4843
// When building CEF include the Chromium header directly.
4944
#include "base/atomic_ref_count.h"
45+
46+
// Used when declaring a base::AtomicRefCount value. This is an object type with
47+
// Chromium headers.
48+
#define ATOMIC_DECLARATION (0)
49+
50+
// Maintaining compatibility with AtompicRefCount* functions that were removed
51+
// from Chromium in http://crrev.com/ee96d561.
52+
namespace base {
53+
54+
// Increment a reference count by 1.
55+
inline void AtomicRefCountInc(volatile AtomicRefCount* ptr) {
56+
const_cast<AtomicRefCount*>(ptr)->Increment();
57+
}
58+
59+
// Decrement a reference count by 1 and return whether the result is non-zero.
60+
// Insert barriers to ensure that state written before the reference count
61+
// became zero will be visible to a thread that has just made the count zero.
62+
inline bool AtomicRefCountDec(volatile AtomicRefCount* ptr) {
63+
return const_cast<AtomicRefCount*>(ptr)->Decrement();
64+
}
65+
66+
// Return whether the reference count is one. If the reference count is used
67+
// in the conventional way, a refrerence count of 1 implies that the current
68+
// thread owns the reference and no other thread shares it. This call performs
69+
// the test for a reference count of one, and performs the memory barrier
70+
// needed for the owning thread to act on the object, knowing that it has
71+
// exclusive access to the object.
72+
inline bool AtomicRefCountIsOne(volatile AtomicRefCount* ptr) {
73+
return const_cast<AtomicRefCount*>(ptr)->IsOne();
74+
}
75+
76+
// Return whether the reference count is zero. With conventional object
77+
// referencing counting, the object will be destroyed, so the reference count
78+
// should never be zero. Hence this is generally used for a debug check.
79+
inline bool AtomicRefCountIsZero(volatile AtomicRefCount* ptr) {
80+
return const_cast<AtomicRefCount*>(ptr)->IsZero();
81+
}
82+
83+
} // namespace base
84+
5085
#else // !USING_CHROMIUM_INCLUDES
5186
// The following is substantially similar to the Chromium implementation.
5287
// If the Chromium implementation diverges the below implementation should be
@@ -56,14 +91,18 @@
5691

5792
// Annotations are not currently supported.
5893
#define ANNOTATE_HAPPENS_BEFORE(obj) /* empty */
59-
#define ANNOTATE_HAPPENS_AFTER(obj) /* empty */
94+
#define ANNOTATE_HAPPENS_AFTER(obj) /* empty */
95+
96+
// Used when declaring a base::AtomicRefCount value. This is an integer/ptr type
97+
// with CEF headers.
98+
#define ATOMIC_DECLARATION = 0
6099

61100
namespace base {
62101

63102
typedef subtle::Atomic32 AtomicRefCount;
64103

65104
// Increment a reference count by "increment", which must exceed 0.
66-
inline void AtomicRefCountIncN(volatile AtomicRefCount *ptr,
105+
inline void AtomicRefCountIncN(volatile AtomicRefCount* ptr,
67106
AtomicRefCount increment) {
68107
subtle::NoBarrier_AtomicIncrement(ptr, increment);
69108
}
@@ -72,7 +111,7 @@ inline void AtomicRefCountIncN(volatile AtomicRefCount *ptr,
72111
// and return whether the result is non-zero.
73112
// Insert barriers to ensure that state written before the reference count
74113
// became zero will be visible to a thread that has just made the count zero.
75-
inline bool AtomicRefCountDecN(volatile AtomicRefCount *ptr,
114+
inline bool AtomicRefCountDecN(volatile AtomicRefCount* ptr,
76115
AtomicRefCount decrement) {
77116
ANNOTATE_HAPPENS_BEFORE(ptr);
78117
bool res = (subtle::Barrier_AtomicIncrement(ptr, -decrement) != 0);
@@ -83,14 +122,14 @@ inline bool AtomicRefCountDecN(volatile AtomicRefCount *ptr,
83122
}
84123

85124
// Increment a reference count by 1.
86-
inline void AtomicRefCountInc(volatile AtomicRefCount *ptr) {
125+
inline void AtomicRefCountInc(volatile AtomicRefCount* ptr) {
87126
base::AtomicRefCountIncN(ptr, 1);
88127
}
89128

90129
// Decrement a reference count by 1 and return whether the result is non-zero.
91130
// Insert barriers to ensure that state written before the reference count
92131
// became zero will be visible to a thread that has just made the count zero.
93-
inline bool AtomicRefCountDec(volatile AtomicRefCount *ptr) {
132+
inline bool AtomicRefCountDec(volatile AtomicRefCount* ptr) {
94133
return base::AtomicRefCountDecN(ptr, 1);
95134
}
96135

@@ -100,7 +139,7 @@ inline bool AtomicRefCountDec(volatile AtomicRefCount *ptr) {
100139
// the test for a reference count of one, and performs the memory barrier
101140
// needed for the owning thread to act on the object, knowing that it has
102141
// exclusive access to the object.
103-
inline bool AtomicRefCountIsOne(volatile AtomicRefCount *ptr) {
142+
inline bool AtomicRefCountIsOne(volatile AtomicRefCount* ptr) {
104143
bool res = (subtle::Acquire_Load(ptr) == 1);
105144
if (res) {
106145
ANNOTATE_HAPPENS_AFTER(ptr);
@@ -111,7 +150,7 @@ inline bool AtomicRefCountIsOne(volatile AtomicRefCount *ptr) {
111150
// Return whether the reference count is zero. With conventional object
112151
// referencing counting, the object will be destroyed, so the reference count
113152
// should never be zero. Hence this is generally used for a debug check.
114-
inline bool AtomicRefCountIsZero(volatile AtomicRefCount *ptr) {
153+
inline bool AtomicRefCountIsZero(volatile AtomicRefCount* ptr) {
115154
bool res = (subtle::Acquire_Load(ptr) == 0);
116155
if (res) {
117156
ANNOTATE_HAPPENS_AFTER(ptr);

libcef/include/base/cef_atomicops.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, Atomic32 new_value);
122122
// *ptr with the increment applied. This routine implies no memory barriers.
123123
Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, Atomic32 increment);
124124

125-
Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
126-
Atomic32 increment);
125+
Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr, Atomic32 increment);
127126

128127
// These following lower-level operations are typically useful only to people
129128
// implementing higher-level synchronization operations like spinlocks,
@@ -183,6 +182,8 @@ Atomic64 Release_Load(volatile const Atomic64* ptr);
183182
#include "include/base/internal/cef_atomicops_mac.h"
184183
#elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY)
185184
#include "include/base/internal/cef_atomicops_x86_gcc.h"
185+
#elif defined(COMPILER_GCC) && defined(__ARM_ARCH)
186+
#include "include/base/internal/cef_atomicops_arm_gcc.h"
186187
#else
187188
#error "Atomic operations are not supported on your platform"
188189
#endif

libcef/include/base/cef_basictypes.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#define CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
3333
#pragma once
3434

35-
#include <limits.h> // For UINT_MAX
36-
#include <stddef.h> // For size_t
35+
#include <limits.h> // For UINT_MAX
36+
#include <stddef.h> // For size_t
3737

3838
#include "include/base/cef_build.h"
3939

@@ -43,34 +43,34 @@
4343
// On Mac OS X, |long long| is used for 64-bit types for compatibility with
4444
// <inttypes.h> format macros even in the LP64 model.
4545
#if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
46-
typedef long int64; // NOLINT(runtime/int)
47-
typedef unsigned long uint64; // NOLINT(runtime/int)
46+
typedef long int64;
47+
typedef unsigned long uint64;
4848
#else
49-
typedef long long int64; // NOLINT(runtime/int)
50-
typedef unsigned long long uint64; // NOLINT(runtime/int)
49+
typedef long long int64;
50+
typedef unsigned long long uint64;
5151
#endif
5252

5353
// TODO: Remove these type guards. These are to avoid conflicts with
5454
// obsolete/protypes.h in the Gecko SDK.
5555
#ifndef _INT32
5656
#define _INT32
57-
typedef int int32;
57+
typedef int int32;
5858
#endif
5959

6060
// TODO: Remove these type guards. These are to avoid conflicts with
6161
// obsolete/protypes.h in the Gecko SDK.
6262
#ifndef _UINT32
6363
#define _UINT32
64-
typedef unsigned int uint32;
64+
typedef unsigned int uint32;
6565
#endif
6666

6767
// UTF-16 character type.
6868
// This should be kept synchronized with base/strings/string16.h
6969
#ifndef char16
7070
#if defined(WCHAR_T_IS_UTF16)
71-
typedef wchar_t char16;
71+
typedef wchar_t char16;
7272
#elif defined(WCHAR_T_IS_UTF32)
73-
typedef unsigned short char16;
73+
typedef unsigned short char16;
7474
#endif
7575
#endif
7676

0 commit comments

Comments
 (0)