Compare commits

..

No commits in common. "a231b7ead7e624dc5c2d79bf4c160aed9c8efeb9" and "2b6f461337ed0654992209c84e9da552e06f38ac" have entirely different histories.

13 changed files with 38 additions and 65 deletions

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=a5ca27729a570de0318a9d15416fee153afaec32$
// $hash=e4cad5e75e1837d5d68c936e71b919e1702afad9$
//
#include "libcef_dll/cpptoc/binary_value_cpptoc.h"
@ -145,13 +145,14 @@ const void* CEF_CALLBACK
binary_value_get_raw_data(struct _cef_binary_value_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self) {
return NULL;
}
// This manual implementation can be removed once support for 'const void*'
// is integrated into the CEF translator tool (issue #3591).
// Execute
const void* _retval = CefBinaryValueCppToC::Get(self)->GetRawData();

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=fd37d01fdcf8c3de25e36d428ca38781c4749586$
// $hash=d9074b7c1500d594cc88a4eedb68d9d31c5f5018$
//
#include "libcef_dll/cpptoc/shared_memory_region_cpptoc.h"
@ -60,13 +60,14 @@ void* CEF_CALLBACK
shared_memory_region_memory(struct _cef_shared_memory_region_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self) {
return NULL;
}
// This manual implementation can be removed once support for 'void*'
// is integrated into the CEF translator tool (issue #3591).
// Execute
void* _retval = CefSharedMemoryRegionCppToC::Get(self)->Memory();

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=fb7e4b1912656da200ed1dd614a9f03e7d5f8ce7$
// $hash=592d43a6597f03f91eb13ea9354ed552f581ebec$
//
#include "libcef_dll/cpptoc/shared_process_message_builder_cpptoc.h"
@ -84,17 +84,15 @@ void* CEF_CALLBACK shared_process_message_builder_memory(
struct _cef_shared_process_message_builder_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self) {
return NULL;
return 0;
}
// Execute
void* _retval = CefSharedProcessMessageBuilderCppToC::Get(self)->Memory();
// Return type: simple_byaddr
// Return type: simple
return _retval;
}

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=10ac43c0f16dedaf21bfa55f126f61c4d179abca$
// $hash=befb2f29af8a0e8eabf745fad126ebad5a741c74$
//
#include "libcef_dll/cpptoc/v8value_cpptoc.h"
@ -976,13 +976,14 @@ v8value_get_array_buffer_byte_length(struct _cef_v8value_t* self) {
}
void* CEF_CALLBACK v8value_get_array_buffer_data(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self) {
return NULL;
}
// This manual implementation can be removed once support for 'void*'
// is integrated into the CEF translator tool (issue #3591).
// Execute
void* _retval = CefV8ValueCppToC::Get(self)->GetArrayBufferData();

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=8ff0f88b9a33d5c635a0128aef98046c68ddb3ad$
// $hash=e5fd79e6dbb20737b5c3a5b6e4bf547336c62398$
//
#include "libcef_dll/ctocpp/binary_value_ctocpp.h"
@ -148,7 +148,8 @@ NO_SANITIZE("cfi-icall") const void* CefBinaryValueCToCpp::GetRawData() {
return nullptr;
}
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// This manual implementation can be removed once support for 'const void*'
// is integrated into the CEF translator tool (issue #3591).
// Execute
const void* _retval = _struct->get_raw_data(_struct);

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=2ac7389e153471dba2e636363a5fb49a5afb0d3a$
// $hash=b2e33c91a598c69f92031e0624bf96803247439c$
//
#include "libcef_dll/ctocpp/shared_memory_region_ctocpp.h"
@ -57,10 +57,11 @@ NO_SANITIZE("cfi-icall") void* CefSharedMemoryRegionCToCpp::Memory() {
cef_shared_memory_region_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, memory)) {
return nullptr;
return NULL;
}
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// This manual implementation can be removed once support for 'void*'
// is integrated into the CEF translator tool (issue #3591).
// Execute
void* _retval = _struct->memory(_struct);

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=b950950a19b7825e808132e616468bb51f8607fb$
// $hash=da73d238eb11ae25ae64d3373e2357e40a01051a$
//
#include "libcef_dll/ctocpp/shared_process_message_builder_ctocpp.h"
@ -82,15 +82,13 @@ NO_SANITIZE("cfi-icall") void* CefSharedProcessMessageBuilderCToCpp::Memory() {
cef_shared_process_message_builder_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, memory)) {
return nullptr;
return NULL;
}
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
void* _retval = _struct->memory(_struct);
// Return type: simple_byaddr
// Return type: simple
return _retval;
}

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=8469f8012718df705bf24d8abc2c127d68df07c2$
// $hash=df9571f843ed0e55e581dc6282079803e3641d2c$
//
#include "libcef_dll/ctocpp/v8value_ctocpp.h"
@ -989,7 +989,8 @@ NO_SANITIZE("cfi-icall") void* CefV8ValueCToCpp::GetArrayBufferData() {
return nullptr;
}
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// This manual implementation can be removed once support for 'void*'
// is integrated into the CEF translator tool (issue #3591).
// Execute
void* _retval = _struct->get_array_buffer_data(_struct);

View File

@ -1064,9 +1064,9 @@ ViewsWindow::ViewsWindow(WindowType type,
with_controls_ = is_normal_type && delegate_->WithControls();
const bool hide_frame = command_line->HasSwitch(switches::kHideFrame);
const bool show_overlays = is_normal_type && hide_frame && !with_controls_ &&
!command_line->HasSwitch(switches::kHideOverlays);
const bool hide_toolbar = !show_overlays && !with_controls_;
const bool hide_overlays =
!is_normal_type || command_line->HasSwitch(switches::kHideOverlays);
const bool hide_toolbar = hide_overlays && !with_controls_;
const bool show_window_buttons =
command_line->HasSwitch(switches::kShowWindowButtons);
accepts_first_mouse_ = command_line->HasSwitch(switches::kAcceptsFirstMouse);
@ -1075,7 +1075,7 @@ ViewsWindow::ViewsWindow(WindowType type,
frameless_ = hide_frame;
// With an overlay that mimics window controls.
with_overlay_controls_ = show_overlays;
with_overlay_controls_ = hide_frame && !hide_overlays && !with_controls_;
// If window has frame or flag passed explicitly
with_standard_buttons_ = !frameless_ || show_window_buttons;

View File

@ -117,13 +117,7 @@ def move_directory(source, target, allow_overwrite=False):
if os.path.exists(source):
msg("Moving directory %s to %s" % (source, target))
if not options.dryrun:
try:
# This will fail if |source| and |target| are on different filesystems,
# or if files in |source| are currently locked.
os.rename(source, target)
except OSError:
msg('ERROR Failed to move directory %s to %s' % (source, target))
raise
shutil.move(source, target)
def is_git_checkout(path):

View File

@ -1514,7 +1514,6 @@ class obj_argument:
if self.type.is_result_vector():
# all vector types must be passed by reference
if not self.type.is_byref():
print('ERROR: Invalid (vector not byref) type')
return 'invalid'
if self.type.is_result_vector_string():
@ -1550,8 +1549,6 @@ class obj_argument:
# string single map type
if self.type.is_result_map_single():
if not self.type.is_byref():
print('ERROR: Invalid (single map not byref) type for %s' %
self.type.get_name())
return 'invalid'
if self.type.is_const():
return 'string_map_single_byref_const'
@ -1560,14 +1557,11 @@ class obj_argument:
# string multi map type
if self.type.is_result_map_multi():
if not self.type.is_byref():
print('ERROR: Invalid (multi map not byref) type for %s' %
self.type.get_name())
return 'invalid'
if self.type.is_const():
return 'string_map_multi_byref_const'
return 'string_map_multi_byref'
print('ERROR: Invalid (unknown) type for %s' % self.type.get_name())
return 'invalid'
def get_retval_type(self):
@ -1575,19 +1569,9 @@ class obj_argument:
if self.type.has_name():
raise Exception('Cannot be called for argument types')
# special case for void* return value (may also be const)
if self.type.get_type() == 'void' and self.type.is_byaddr():
return 'simple_byaddr'
# unsupported modifiers
if self.type.is_const():
print('ERROR: Invalid (const) type for retval')
return 'invalid'
if self.type.is_byref():
print('ERROR: Invalid (byref) type for retval')
return 'invalid'
if self.type.is_byaddr():
print('ERROR: Invalid (byaddr) type for retval')
if self.type.is_const() or self.type.is_byref() or \
self.type.is_byaddr():
return 'invalid'
# void types don't have a return value
@ -1612,7 +1596,6 @@ class obj_argument:
else:
return prefix + 'ptr_diff'
print('ERROR: Invalid (unknown) type for retval')
return 'invalid'
def get_retval_default(self, for_capi):
@ -1632,10 +1615,6 @@ class obj_argument:
type = self.get_retval_type()
if type == 'simple':
return self.get_type().get_result_simple_default()
elif type == 'simple_byaddr':
if for_capi:
return 'NULL'
return 'nullptr'
elif type == 'bool':
if for_capi:
return '0'

View File

@ -325,7 +325,7 @@ def make_cpptoc_function_impl_new(cls, name, func, defined_names, base_scoped):
if retval_type != 'none':
# has a return value
if retval_type == 'simple' or retval_type == 'simple_byaddr':
if retval_type == 'simple':
result += retval.get_type().get_result_simple_type()
else:
result += retval.get_type().get_type()
@ -446,7 +446,7 @@ def make_cpptoc_function_impl_new(cls, name, func, defined_names, base_scoped):
if retval_type != 'none':
# has a return value
result += '\n // Return type: ' + retval_type
if retval_type == 'simple' or retval_type == 'simple_byaddr' or retval_type == 'bool':
if retval_type == 'simple' or retval_type == 'bool':
result += '\n return _retval;'
elif retval_type == 'string':
result += '\n return _retval.DetachToUserFree();'

View File

@ -342,8 +342,6 @@ def make_ctocpp_function_impl_new(clsname, name, func, base_scoped):
# has a return value
if retval_type == 'simple' or retval_type == 'bool':
result += retval.get_type().get_result_simple_type_root()
elif retval_type == 'simple_byaddr':
result += retval.get_type().get_result_simple_type()
elif retval_type == 'string':
result += 'cef_string_userfree_t'
elif retval_type == 'refptr_same' or retval_type == 'refptr_diff' or \
@ -487,7 +485,7 @@ def make_ctocpp_function_impl_new(clsname, name, func, base_scoped):
if retval_type != 'none':
# has a return value
result += '\n // Return type: ' + retval_type
if retval_type == 'simple' or retval_type == 'simple_byaddr':
if retval_type == 'simple':
result += '\n return _retval;'
elif retval_type == 'bool':
result += '\n return _retval?true:false;'