- $(DEBUG)
- $(DEBUG)
- $(DEBUG)
- $(DEBUG)
- $(DEBUG)
- $(Translate)
- $(Translate)
- $(Translate)
- $(Translate)
- $(Translate)
参考CEF官方论坛的这个帖子,尽量不要在CEF里做进程间同步通信,但如果你非要做。以下步骤是一个方案:
- Start the call in the Browser process by "SendMessage".
- In the BrowserProcess, configure a wait handle on an event until it gets signaled and wait.
- The Render process receives the sent message from the Browser process.
- The Render process calls the TryEval to execute the JavaScript.
- The return code of the evaluation is being sent back to the Browser process, marshaled into a CefProcessMessage.
- The Browser process receives the message, un-marshals the return code inside the message.
- The event object is being signaled.
- The Browser process returns to the caller the result of the JavaScript call.
如果是在Render进程首先发起调用,不要在CEFV8Handler的Execute里阻塞住执行流,参考CEF官方论坛的这个使用Task的帖子。