Hi. I have successfully set up threading in my application based on skrul's thread demo extension. However with more complex code in the threads, I get a very unexpected error. I am wondering if anyone has come across this.
In my thread I try to instance a number of custom made JS components in the run method of nsIRunnable. All is well until I run my application a second time (after changing the build id) and when I attempt to instance my components, I get 3 errors for one component but not the other components: Error: too much recursion Error: too much recursion Error: [Exception... "ComponentManager::CreateInstance returned failure code:" nsresult: "0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE)" location: "JS frame :: chrome://understandingfaith/content/browser/search-thread-worker.js :: anonymous :: line 13" data: no] Source File: chrome://understandingfaith/content/browser/search-thread-worker.js Line: 13 Note: "chrome://understandingfaith/content/browser/search-thread- worker.js" is loaded by my thread component to do work. The first time the application is run, the component is initialized in the order of: registerSelf, getClassObject, createInstance The second time the application is run, createInstance isn't even called in JS code before the above mentioned errors are returned. I can instance the component outside of the thread run method however. If you instance a component inside a thread, it doesn't have to be proxied if it doesn't run on/touch the UI thread right? Also if I create an instance of the component anywhere outside of the thread run method and then again within the thread run event, it works as expected. I am using XULRunner 1.8.1.3. Has anyone experienced this problem? Thanks very much, James _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
