RFC --- new scripting extension sketches.
koos vriezen
koos.vriezen at gmail.com
Sun May 23 00:06:19 BST 2010
2010/5/22 Maksim Orlovich <mo85 at cornell.edu>:
>> I am now working to get at least the window.location.href sequence
>> working. Until now, the deserializing from a dbusvariant to an object
>> fails.
>
> I didn't provide marshallers for Object and FunctionRef due to the
> pointers, as it's not clear what the right thing for them is.
For kmplayer concerns, just remove the dbus marshallers. I don't need them.
I don't recall where, but I understood from the QDbusFoo docu that
incoming dbus calls (from plugin to part) don't auto marshal complex
types. So the dbus decls are only useful in the other direction.
>> I can however get a QDBusArgument out of the variant and do a
>> manual extraction.
>> Also serializing Null and Undefined gives an error, Qt doesn't like
>> the empty struct ("()" signature)
>
> I'll add a dummy int there then.
Currently I have my own ObjectContainer struct (id+owner), both zero means Null.
> Anyway, to clarify the refcounting protocol, since I think I know what you
> want:
>
> 1) Return values (including from enclosingObject/rootObject) are always
> ref'd by the producer
> 2) Arguments are to be guaranteed to live for the duration of the call,
> and the callee only ref's if it retains them
That is what I proposed too. Currently however for 1), khtml calls
acquire on the returned value of 'rootObject', which it shouldn't
then, no? (Could be an unnecessary acquire/release pair caused by the
extra storage, which in this case, is pretty expensive)
> Also, I should fix the following:
> 1) Dummy fields for Null/Undefined
Again, for kmplayer this is void
> 2) Make KHTML (and ScriptableLiveConnectExtension) follow the refcount
> protocol.
> 3) Fix KHTML's evaluate call to properly return values
Thanks, your work is really appreciated.
I now have get/call to plugin also working, so youtube works with new
API. I haven't implemented the release/acquire though. Have pushed it
to kde svn, if you want to try, let the debug output not scare you :)
The other day I remembered that in order to get kmplayer play flash,
one has to edit kmplayerrc:
[application/x-shockwave-flash]
player=npp
plugin=/home/koos/.mozilla/plugins/libflashplayer.so
> Also, there is one more thing: IMHO the plugin should be required to
> release all of its references when it's deleted (to break cycles). It
> seems like that's doable for you, right?
Yep, I need to create a list for browser objects anyhow.
Koos
More information about the kfm-devel
mailing list