Hi, I am working on a C++ XPCOM component which encrypts and decrypts the HTTP request and response using certain algorithms.
I have registered a custom HTTP handler class which does the encryption in NewProxiedChannel(...) method while opening the channel corresponding to the request. The custom handler needs to get some input from the user before opening the new encrypted channel (if certain conditions are not met) and has to synchronously wait till it gets the information from the user. The handler broadcasts a notification from the NewProxiedChannel(...) method. The Javascript has an Observer which listens for it and displays a dialog box to get the user information. What kind of wait-notify mechanism is there in XPCOM ? I tried using various approaches (such as sleeping for certain time interval using PR_Sleep(...) and periodically checking the state, getting the thread event queue and explicitly processing the pending events every time the thread wakes up etc.) My Javascript hangs with all the approaches I have tried. Can anyone please point me in the right direction ? Thanks a lot ! Maya _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
