translator.bat error after adding new I/F call to mojom IDL

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

translator.bat error after adding new I/F call to mojom IDL

Postby user6294 » Fri Dec 11, 2020 1:42 pm

Hi Marshall,

// added an additional IDL interface call to src\services\network\public\mojom\network_context.mojom, and
// cef_request_context.h

I'm not quite sure why I'm getting this error

add additional Chrome IDL I/F call

1. src\services\network\public\mojom\network_context.mojom
SendToChromiumNetwork(int32 msgId, string text, array<uint8> data) => (int32 result);

Many Thanks

Chi

C:\ABC\Dev\code\chromium_git1\chromium\src\cef\tools>translator.bat

Parsing C++ headers from C:\ABC\Dev\code\chromium_git1\chromium\src\cef\include...
Traceback (most recent call last):
File "C:\ABC\Dev\code\chromium_git1\chromium\src\cef\tools\\translator.py", line 103, in <module>
header.add_directory(cpp_header_dir, excluded_files)
File "C:\ABC\Dev\code\chromium_git1\chromium\src\cef\tools\cef_parser.py", line 552, in add_directory
self.add_file(file)
File "C:\ABC\Dev\code\chromium_git1\chromium\src\cef\tools\cef_parser.py", line 564, in add_file
self.add_data(filename, read_file(filepath))
File "C:\ABC\Dev\code\chromium_git1\chromium\src\cef\tools\cef_parser.py", line 652, in add_data
includes, forward_declares))
File "C:\ABC\Dev\code\chromium_git1\chromium\src\cef\tools\cef_parser.py", line 866, in __init__
vfmod.strip()))
File "C:\ABC\Dev\code\chromium_git1\chromium\src\cef\tools\cef_parser.py", line 1328, in __init__
comment)
File "C:\ABC\Dev\code\chromium_git1\chromium\src\cef\tools\cef_parser.py", line 1111, in __init__
argument = obj_argument(self, arg)
File "C:\ABC\Dev\code\chromium_git1\chromium\src\cef\tools\cef_parser.py", line 1350, in __init__
self.type = self.parent.parent.get_analysis(argval)
File "C:\ABC\Dev\code\chromium_git1\chromium\src\cef\tools\cef_parser.py", line 1034, in get_analysis
return obj_analysis([self, self.parent], value, named)
File "C:\ABC\Dev\code\chromium_git1\chromium\src\cef\tools\cef_parser.py", line 1653, in __init__
if self._check_advanced(self.type) == True:
File "C:\ABC\Dev\code\chromium_git1\chromium\src\cef\tools\cef_parser.py", line 1679, in _check_advanced
self.result_value[0]['vector_type'] = val
TypeError: 'NoneType' object does not support item assignment
Press any key to continue . . .
user6294
Mentor
 
Posts: 83
Joined: Sun Mar 18, 2018 6:57 pm

Re: translator.bat error after adding new I/F call to mojom

Postby magreenblatt » Fri Dec 11, 2020 2:07 pm

What did you add in cef_request_context.h?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: translator.bat error after adding new I/F call to mojom

Postby user6294 » Fri Dec 11, 2020 3:42 pm

This is what I added a couple of months of ago, works fine

///
// Starts an RTMP connect to |url|
///
/*--cef(optional_param=callback)--*/
virtual void StartRTMPConnect(const CefString& url, CefRefPtr<CefRtmpConnectCallback> callback) = 0;

====

This is what I added just now (which is failing the translator)
///
// Callback interface for CefRequestContext::SendToChromiumNetwork.
///
/*--cef(source=client)--*/
class CefSendToChromiumNetworkCallback : public virtual CefBaseRefCounted {
public:
///
// Called on the UI thread after the ResolveHost request has completed.
// |result| will be the result code. |resolved_ips| will be the list of
// resolved IP addresses or empty if the resolution failed.
///
/*--cef(optional_param=resolved_ips)--*/
virtual void OnSendToChromiumNetworkCompleted(
int32_t result) = 0;
};

///
// Send a message to chromium network |msgId|
///
/*--cef(optional_param=callback)--*/
virtual void SendToChromiumNetwork(int32_t msgId, const CefString & text, const std::vector<uint8_t> & data, CefRefPtr<CefSendToChromiumNetworkCallback> callback) = 0;


Many Thanks

Chi
user6294
Mentor
 
Posts: 83
Joined: Sun Mar 18, 2018 6:57 pm

Re: translator.bat error after adding new I/F call to mojom

Postby magreenblatt » Fri Dec 11, 2020 3:52 pm

1. There is no |resolved_ips| parameter.
2. You’re potentially using data types that are not supported by the translator. Stick to types that are already used in other CEF include headers.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 98 guests

cron