Convert legacy IPC messages to Mojo (fixes issue #3123)

This change introduces a few minor CEF API behavior changes:

- A CefProcessMessage object cannot be reused after being passed to
  SendProcessMessage.
- The |extra_info| argument to CefRenderProcessHandler::OnBrowserCreated may
  now be NULL.

Where appropriate, we now utilize the default UTF string encoding format and
shared memory to reduce copies and conversions for the cross-process
transfer of arbitrary-length strings. For example, CefFrame::GetSource/GetText
now involves zero UTF conversions and zero copies in the browser process for
the CefString delivered to CefStringVisitor::Visit().
This commit is contained in:
Marshall Greenblatt
2021-05-14 12:58:55 -04:00
parent 4f0b7b4511
commit ebee84755e
82 changed files with 1615 additions and 2386 deletions

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=4cc516704229f90c49852b46f932b8882b4bf8d4$
// $hash=ef73c2a273a05144f419aca52f32ae4b3e12882a$
//
#include "libcef_dll/ctocpp/render_process_handler_ctocpp.h"
@@ -51,10 +51,7 @@ void CefRenderProcessHandlerCToCpp::OnBrowserCreated(
DCHECK(browser.get());
if (!browser.get())
return;
// Verify param: extra_info; type: refptr_diff
DCHECK(extra_info.get());
if (!extra_info.get())
return;
// Unverified params: extra_info
// Execute
_struct->on_browser_created(_struct, CefBrowserCppToC::Wrap(browser),