Am Freitag, 28. Oktober 2016 17:05:28 UTC+2 schrieb Boris Zbarsky:
> On 10/28/16 4:27 AM, Tobias Wolf wrote:
> > Where or how can I check for that?
> 
> XRE_GetProcessType().  Check the return value against 
> GeckoProcessType_Content and GeckoProcessType_Default for content and UI 
> process respectively.
> 
> > What would be your recommended solution for showing a dialog in nss module? 
> > I know that fw is reacting on certificate selection or even loading a nss 
> > module with a dialog, but I couldn`t find out how it is implemented.
> 
> security/manager/pki/nsNSSDialogs.cpp presumably.
> 
> For the certificate selection case, this is presumably 
> nsNSSDialogs::ChooseCertificate which is being called from 
> ClientAuthDataRunnable::RunOnTargetThread, which is presumably posted to 
> the main thread to avoid doing that sort of thing on background threads.
> 
> Please make sure to test anything you create here in a debug build; that 
> will catch threadsafety issues for you in many cases.
> 
> -Boris

I have checked the source code file you mentioned above and I think from my 
perspective I do more or less the same. You said I should use 
ClientAuthDataRunnable::RunOnTargetThread, I think I understand the meaning, 
but I`m not knowing what is behind, how can I run my code using the prompt 
service and let it run on the main thread?
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to