Hi Ben,

I was able to get something similar to what you are trying to do working by subclassing ScriptExecutionContext::Task and using the ScriptExecutionContext::postTask() method.

You can get the ScriptExecutionContext from the current DOMWindow.

Dan

On 12/13/2011 10:24 AM, demallien wrote:
Hi Ben,

The short answer is no - you need to call JSObjectCallAsFunction from the same 
thread that you
created you JSContextRef in.

Allison


Message: 1
Date: Mon, 12 Dec 2011 21:00:25 +0000
From: Ben Short <[email protected] <mailto:[email protected]>>
To: [email protected] <mailto:[email protected]>
Subject: [webkit-help] Calling JSObjectCallAsFunction from a worker
thread
Message-ID:
<CAOiKr=tsf4iedrmsfsnnugggjwd72yebadqvv0gjm6zfi3k...@mail.gmail.com
<mailto:[email protected]>>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I have created a custom javascript object using the JavaScriptCore
API. My object allows listeners to be registered with it. I need to
call these listeners on various events from a worker thread that is
created when the object is instantiated.

Is it safe to call the JSObjectCallAsFunction function from a worker thread?

Regards

Ben Short




_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help

Reply via email to