Loading netwerk/dns/nsDNSService2.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -687,6 +687,15 @@ nsDNSService::Resolve(const nsACString &hostname, uint32_t flags, nsIDNSRecord **result) { NS_WARNING("Do not use synchronous DNS resolution! This API may be removed soon."); // We will not allow this to be called on the main thread. This is transitional // and a bit of a test for removing the synchronous API entirely. if (NS_IsMainThread()) { NS_ERROR("Synchronous DNS resolve failing - not allowed on the main thread!"); return NS_ERROR_FAILURE; } // grab reference to global host resolver and IDN service. beware // simultaneous shutdown!! nsRefPtr<nsHostResolver> res; Loading netwerk/dns/nsIDNSService.idl +2 −3 Original line number Diff line number Diff line Loading @@ -59,9 +59,8 @@ interface nsIDNSService : nsISupports in nsresult aReason); /** * called to synchronously resolve a hostname. warning this method may * block the calling thread for a long period of time. it is extremely * unwise to call this function on the UI thread of an application. * Called to synchronously resolve a hostname. This method will fail * if called from the main thread. * * @param aHostName * the hostname or IP-address-literal to resolve. Loading Loading
netwerk/dns/nsDNSService2.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -687,6 +687,15 @@ nsDNSService::Resolve(const nsACString &hostname, uint32_t flags, nsIDNSRecord **result) { NS_WARNING("Do not use synchronous DNS resolution! This API may be removed soon."); // We will not allow this to be called on the main thread. This is transitional // and a bit of a test for removing the synchronous API entirely. if (NS_IsMainThread()) { NS_ERROR("Synchronous DNS resolve failing - not allowed on the main thread!"); return NS_ERROR_FAILURE; } // grab reference to global host resolver and IDN service. beware // simultaneous shutdown!! nsRefPtr<nsHostResolver> res; Loading
netwerk/dns/nsIDNSService.idl +2 −3 Original line number Diff line number Diff line Loading @@ -59,9 +59,8 @@ interface nsIDNSService : nsISupports in nsresult aReason); /** * called to synchronously resolve a hostname. warning this method may * block the calling thread for a long period of time. it is extremely * unwise to call this function on the UI thread of an application. * Called to synchronously resolve a hostname. This method will fail * if called from the main thread. * * @param aHostName * the hostname or IP-address-literal to resolve. Loading