I'm developing windows app based on xulrunner, but now I have major problem and nowhere can find solution, that is why I'm writing here. Orginaly app was on xulrunner 11, but now we trying to change core xpcom c++ component that connects to database (to be specific we trying add support for oracle database, now it is only mariadb/mysql) - we call it "db wrapper". To move things forward (and this is oportunity to change xulrunner version to newer) we decide to use xulrunner 28.0 and problems occurs. This new xulrunner version doesn't have proxies objects and I don't have a clue how to implement callback from oure component to javascript. Basicly idea is easy from javascript we call "db wrapper" with take function (callback) as argument (that function implement xpidl interface with scriptable and function annotations), in "db wrapper" component we run thread where real database connection exists and fetch data, then we join to main thread and return result by callback (mentioned above). BUT application crash after calling callback (now there is now proxies api) and I assume that callback i collected by collected by javascript GC. (When all happens only in main thread then all it's ok). I can't figure out how to extend lifetime of callback. LIB: XULRunner 28 OS: Windows 7 - 32bit.
I'm trying using this pattern https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Guide/Cross-thread_calls_using_runnables with that diffrence that I'm using nsCOMPtr to callback interface instade of pointer to function. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform