"Transfer" to a webworker a object created with CreateObject

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.

"Transfer" to a webworker a object created with CreateObject

Postby lbarbisan » Fri Mar 17, 2017 2:52 am

Hello,

Currently when I try to transfer a object created by Cefv8Value->CreateObject() using :
Code: Select all
var worker = new Worker("Worker.js");
    var transferable =
    {
        data: boundObject
    };
    worker.postMessage(transferable, [data.boundObject]);


where boundObject is the object created by CreateObject

it returns :
Code: Select all
[0315/185104:INFO:CONSOLE(20)] "Uncaught TypeError: Failed to execute 'postMessage' on 'Worker': Value at index 0 does not have a transferable type."


Is there a way to tranfer such object so that webworker can call methods on it (it's ok if Renderer can't access it any more) ?

Or may be we can clone it ? But I tried and get the error "can't clone..."

Thanks,
lbarbisan
Newbie
 
Posts: 1
Joined: Fri Mar 17, 2017 2:45 am

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 65 guests