mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
tools: Fix incorrect SharedMemoryRegion translation (fixes #3498)
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
// implementations. See the translator.README.txt file in the tools directory
|
// implementations. See the translator.README.txt file in the tools directory
|
||||||
// for more information.
|
// for more information.
|
||||||
//
|
//
|
||||||
// $hash=08e499b1e81c4c9a106ed4e7bdbe7f6fc0f438d7$
|
// $hash=9b9187a75a85ff63f2244471af1e54f40eae5a82$
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "libcef_dll/cpptoc/shared_memory_region_cpptoc.h"
|
#include "libcef_dll/cpptoc/shared_memory_region_cpptoc.h"
|
||||||
@@ -59,8 +59,6 @@ const void* CEF_CALLBACK
|
|||||||
shared_memory_region_memory(struct _cef_shared_memory_region_t* self) {
|
shared_memory_region_memory(struct _cef_shared_memory_region_t* self) {
|
||||||
shutdown_checker::AssertNotShutdown();
|
shutdown_checker::AssertNotShutdown();
|
||||||
|
|
||||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
||||||
|
|
||||||
DCHECK(self);
|
DCHECK(self);
|
||||||
if (!self) {
|
if (!self) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
// implementations. See the translator.README.txt file in the tools directory
|
// implementations. See the translator.README.txt file in the tools directory
|
||||||
// for more information.
|
// for more information.
|
||||||
//
|
//
|
||||||
// $hash=26acb8a4438dd076be91d48565a6a59805bec0f8$
|
// $hash=79771feab6c6d60667691c826ca9d6deaa23d068$
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "libcef_dll/ctocpp/shared_memory_region_ctocpp.h"
|
#include "libcef_dll/ctocpp/shared_memory_region_ctocpp.h"
|
||||||
@@ -59,8 +59,6 @@ NO_SANITIZE("cfi-icall") const void* CefSharedMemoryRegionCToCpp::Memory() {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
||||||
|
|
||||||
// Execute
|
// Execute
|
||||||
const void* _retval = _struct->memory(_struct);
|
const void* _retval = _struct->memory(_struct);
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
// implementations. See the translator.README.txt file in the tools directory
|
// implementations. See the translator.README.txt file in the tools directory
|
||||||
// for more information.
|
// for more information.
|
||||||
//
|
//
|
||||||
// $hash=095699acd421d433e599a53919507f205b780f2f$
|
// $hash=439e6639c3e7a3f99de34d6c499b1c6766dc7fa7$
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "libcef_dll/ctocpp/shared_process_message_builder_ctocpp.h"
|
#include "libcef_dll/ctocpp/shared_process_message_builder_ctocpp.h"
|
||||||
|
@@ -344,8 +344,6 @@ _cre_attrib = '/\*--cef\(([A-Za-z0-9_ ,=:\n]{0,})\)--\*/'
|
|||||||
_cre_cfname = '([A-Za-z0-9_]{1,})'
|
_cre_cfname = '([A-Za-z0-9_]{1,})'
|
||||||
# regex for matching class and function names including path separators
|
# regex for matching class and function names including path separators
|
||||||
_cre_cfnameorpath = '([A-Za-z0-9_\/]{1,})'
|
_cre_cfnameorpath = '([A-Za-z0-9_\/]{1,})'
|
||||||
# regex for matching function return values
|
|
||||||
_cre_retval = '([A-Za-z0-9_<>:,\*\&]{1,})'
|
|
||||||
# regex for matching typedef value and name combination
|
# regex for matching typedef value and name combination
|
||||||
_cre_typedef = '([A-Za-z0-9_<>:,\*\&\s]{1,})'
|
_cre_typedef = '([A-Za-z0-9_<>:,\*\&\s]{1,})'
|
||||||
# regex for matching function return value and name combination
|
# regex for matching function return value and name combination
|
||||||
@@ -418,6 +416,10 @@ def get_function_impls(content, ident, has_impl=True):
|
|||||||
return value, name, arguments and body. Ident must occur somewhere in
|
return value, name, arguments and body. Ident must occur somewhere in
|
||||||
the value.
|
the value.
|
||||||
"""
|
"""
|
||||||
|
# Remove prefix from methods in CToCpp files.
|
||||||
|
content = content.replace('NO_SANITIZE("cfi-icall") ', '')
|
||||||
|
content = content.replace('NO_SANITIZE("cfi-icall")\n', '')
|
||||||
|
|
||||||
# extract the functions
|
# extract the functions
|
||||||
find_regex = '\n' + _cre_func + '\((.*?)\)([A-Za-z0-9_\s]{0,})'
|
find_regex = '\n' + _cre_func + '\((.*?)\)([A-Za-z0-9_\s]{0,})'
|
||||||
if has_impl:
|
if has_impl:
|
||||||
|
Reference in New Issue
Block a user