On Mon, 02 Mar 2009 14:58:46 +0100, Steve Block <[email protected]>
wrote:
Thanks for the new patch.
------------------------------------
Line 645: OperaJsRunner(NPP instance, void* object)
Rather than passing the global object through to this function from
OperaWorkerThreadImpl::CreateWorkerFactory, could you add a method to
OperaGearsApiInterface to get the global object? That way, we wouldn't
need a new version of NewJsRunner?
No, the global object is what identifies each worker thread in Opera and
we need to be told that when Gears does script related calls to Opera.
But the object is set by Opera - Opera passes it to
OperaWorkerThreadImpl::CreateWorkerFactory. Rather than store the
object in the JsRunner, Opera could look it up each time Gears makes a
script-related call. Opera could use the thread's ID to identify the
thread on which the script-related calls are made, then look up the
object from a map internally. This seems neater than modifying the
Gears JsRunner API, which is platform independent, with an ifdef.
I'll confer with the worker guys and see what we can do.
Also, it seems you forgot to send an updated version of js_types.h.
That file should now be unchanged from what you have in your repository.
--
Stig Halvorsen
Senior Core Developer
Opera Software ASA