same v8context for web worker as for 'main' script?

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.

same v8context for web worker as for 'main' script?

Postby GuyHERMANN » Mon Jul 08, 2013 5:38 am

Hi all,

I'd like to have information regarding Web Workers in CEF.

Context:
-all that follows is related to CEF3 on branch 1453
-the renderer successfully executes a 'main' JS script that creates a WebWorker
-However, I noticed that NO v8Context (traced through the on_context_created C API callback) IS CREATED at (and after) web worker creation

Question:
-do you confirm that the web worker is executed using the same v8Context as the 'main' script?
-are both scripts really running on parallel execution flows (threads)?
-am I missing something?


BR
GH
GuyHERMANN
Newbie
 
Posts: 5
Joined: Fri Jul 05, 2013 4:04 am

Re: same v8context for web worker as for 'main' script?

Postby magreenblatt » Mon Jul 08, 2013 10:39 am

WebWorkers use a separate thread and V8 context. Usage of WebWorkers is described here. Support for CEF bindings from WebWorkers is discussed in https://code.google.com/p/chromiumembed ... ail?id=451.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: same v8context for web worker as for 'main' script?

Postby GuyHERMANN » Tue Jul 09, 2013 12:53 am

OK,

thanks a lot for confirming the web worker conformity.
I will retry but this time using the C++API hoping that the OnContextCreated will be called at Web Worker creation (I was using the C API)
GuyHERMANN
Newbie
 
Posts: 5
Joined: Fri Jul 05, 2013 4:04 am

Re: same v8context for web worker as for 'main' script?

Postby magreenblatt » Tue Jul 09, 2013 11:43 am

GuyHERMANN wrote:I will retry but this time using the C++API hoping that the OnContextCreated will be called at Web Worker creation (I was using the C API)

It won't be. You need the changes from issue 451.
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 101 guests