mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 18:55:30 +00:00
742fc7eb48
This function is an infallible alternative to nsIURI::GetSpec(). It's useful when it's appropriate to handle a GetSpec() failure with a failure string, e.g. for log/warning/error messages. It allows code like this: nsAutoCString spec; uri->GetSpec(spec); printf("uri: %s", spec.get()); to be changed to this: printf("uri: %s", uri->GetSpecOrDefault().get()); This introduces a slight behavioural change. Previously, if GetSpec() failed, an empty string would be used here. Now, "[nsIURI::GetSpec failed]" will be produced instead. In most cases this failure string will make for a clearer log/warning/error message than the empty string. * * * Bug 1297961 (part 1b) - More GetSpecOrDefault() additions. r=hurley. I will fold this into part 1 before landing. --HG-- extra : rebase_source : ddc19a5624354ac098be019ca13cc24b99b80ddc |
||
---|---|---|
.. | ||
browser | ||
crashtests | ||
gtest | ||
httpserver | ||
mochitests | ||
reftest | ||
unit | ||
unit_ipc | ||
moz.build | ||
NetwerkTestLogging.h | ||
PropertiesTest.cpp | ||
ReadNTLM.cpp | ||
sites.txt | ||
TestBind.cpp | ||
TestBlockingSocket.cpp | ||
TestCacheBlockFiles.cpp | ||
TestCachePrefixKeyParser.cpp | ||
TestCommon.h | ||
TestCookie.cpp | ||
TestDNS.cpp | ||
TestDNSDaemon.cpp | ||
TestFileInput2.cpp | ||
TestIDN.cpp | ||
TestIncrementalDownload.cpp | ||
TestIOThreads.cpp | ||
TestMakeAbs.cpp | ||
TestOpen.cpp | ||
TestOverlappedIO.cpp | ||
TestProtocols.cpp | ||
TestServ.cpp | ||
TestServ.js | ||
TestSocketInput.cpp | ||
TestSocketIO.cpp | ||
TestSocketTransport.cpp | ||
TestStreamLoader.cpp | ||
TestStreamPump.cpp | ||
TestStreamTransport.cpp | ||
TestUDPSocket.cpp | ||
TestUDPSocketProvider.cpp | ||
TestUpload.cpp | ||
TestURLManipulation.html | ||
TestURLParser.cpp | ||
TestWriteSpeed.cpp | ||
urlparse_mac.dat | ||
urlparse_unx.dat | ||
urlparse_win.dat | ||
urlparse.dat | ||
urltest.cpp | ||
urltests.dat |