JS binding - breakpoint on FrameCToCpp GetV8Context

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.

Re: JS binding - breakpoint on FrameCToCpp GetV8Context

Postby magreenblatt » Mon Jan 13, 2014 1:47 pm

SinnerSmile wrote:It seems, that I must use IPC, builded in CEF, to send messages from browser to render process and in OnProcessMessageReceived() put recieved message in my variable?

Correct. Also, be aware that multiple browsers may exist in the same render process. You probably don't want to use global variables.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: JS binding - breakpoint on FrameCToCpp GetV8Context

Postby SinnerSmile » Mon Jan 13, 2014 6:55 pm

Thx for advise, I will look carefully for my globals. Tryed this IPC, it's working fine, data changing.
Yet, I still can't understand why that jprint("Something"), that I put inside method, binded to JS function in Execute(), do simply nothing.
It's working from the WM_COMMAND (as i suppose it's part of a browser process), but it uses ExecuteJavaScript();
Is it must be executed in browser process, well, cos it's executed on browser frame?
Kind of send message from render process, and on recieveng it in browser - trigger jprint()?
In wiki I can see something like this:
All code that interacts with JS must be executed on the UI thread... With CEF3 WebKit and JS execution run in a separate renderer process. The main thread in a renderer process is identified as TID_RENDERER and all V8 execution must take place on this thread.

I thought that ExecuteJavaScript() must be run in Renderer process, than why it's working in WM_COMMAND and not working in Execute(), that, as I get it, Renderer process anyway...
SinnerSmile
Techie
 
Posts: 34
Joined: Sun Aug 25, 2013 8:07 am

Previous

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 218 guests