Support custom V8 bindings on WebWorker threads (issue #451).

- Add CefRenderProcessHandler callbacks for WebWorker context creation, release and uncaught exceptions.
- Add CefTaskRunner class that supports posting of tasks to standard threads and WebWorker threads.
- Organize V8 internal state information on a per-thread/per-Isolate basis.
- Add webkit_451.patch that provides the WebKit implementation.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@972 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-01-03 17:24:24 +00:00
parent f30fbb3d48
commit afe3cb1d67
44 changed files with 2434 additions and 406 deletions

View File

@ -12,6 +12,7 @@
#include "libcef_dll/cpptoc/browser_cpptoc.h"
#include "libcef_dll/cpptoc/frame_cpptoc.h"
#include "libcef_dll/cpptoc/task_runner_cpptoc.h"
#include "libcef_dll/cpptoc/v8context_cpptoc.h"
#include "libcef_dll/cpptoc/v8exception_cpptoc.h"
#include "libcef_dll/cpptoc/v8value_cpptoc.h"
@ -52,6 +53,22 @@ CEF_EXPORT int cef_v8context_in_context() {
// MEMBER FUNCTIONS - Body may be edited by hand.
cef_task_runner_t* CEF_CALLBACK v8context_get_task_runner(
struct _cef_v8context_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefTaskRunner> _retval = CefV8ContextCppToC::Get(
self)->GetTaskRunner();
// Return type: refptr_same
return CefTaskRunnerCppToC::Wrap(_retval);
}
int CEF_CALLBACK v8context_is_valid(struct _cef_v8context_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -226,6 +243,7 @@ int CEF_CALLBACK v8context_eval(struct _cef_v8context_t* self,
CefV8ContextCppToC::CefV8ContextCppToC(CefV8Context* cls)
: CefCppToC<CefV8ContextCppToC, CefV8Context, cef_v8context_t>(cls) {
struct_.struct_.get_task_runner = v8context_get_task_runner;
struct_.struct_.is_valid = v8context_is_valid;
struct_.struct_.get_browser = v8context_get_browser;
struct_.struct_.get_frame = v8context_get_frame;