diff options
Diffstat (limited to 'netwerk')
-rw-r--r-- | netwerk/base/nsFileStreams.cpp | 6 | ||||
-rw-r--r-- | netwerk/base/nsMediaFragmentURIParser.h | 1 | ||||
-rw-r--r-- | netwerk/base/nsStandardURL.h | 1 | ||||
-rw-r--r-- | netwerk/test/unit/test_bug650995.js | 14 | ||||
-rw-r--r-- | netwerk/test/unit/test_idn_blacklist.js | 7 | ||||
-rw-r--r-- | netwerk/test/unit/test_idn_urls.js | 7 |
6 files changed, 7 insertions, 29 deletions
diff --git a/netwerk/base/nsFileStreams.cpp b/netwerk/base/nsFileStreams.cpp index 6508b33b9..5a82dea1b 100644 --- a/netwerk/base/nsFileStreams.cpp +++ b/netwerk/base/nsFileStreams.cpp @@ -5,7 +5,7 @@ #include "ipc/IPCMessageUtils.h" -#if defined(XP_UNIX) || defined(XP_BEOS) +#if defined(XP_UNIX) #include <unistd.h> #elif defined(XP_WIN) #include <windows.h> @@ -97,14 +97,14 @@ nsFileStreamBase::SetEOF() if (mFD == nullptr) return NS_BASE_STREAM_CLOSED; -#if defined(XP_UNIX) || defined(XP_BEOS) +#if defined(XP_UNIX) // Some system calls require an EOF offset. int64_t offset; rv = Tell(&offset); if (NS_FAILED(rv)) return rv; #endif -#if defined(XP_UNIX) || defined(XP_BEOS) +#if defined(XP_UNIX) if (ftruncate(PR_FileDesc2NativeHandle(mFD), offset) != 0) { NS_ERROR("ftruncate failed"); return NS_ERROR_FAILURE; diff --git a/netwerk/base/nsMediaFragmentURIParser.h b/netwerk/base/nsMediaFragmentURIParser.h index acfa1d5fe..14ca60f53 100644 --- a/netwerk/base/nsMediaFragmentURIParser.h +++ b/netwerk/base/nsMediaFragmentURIParser.h @@ -89,7 +89,6 @@ private: bool ParseNPTMM(nsDependentSubstring& aString, uint32_t& aMinute); bool ParseNPTSS(nsDependentSubstring& aString, uint32_t& aSecond); bool ParseXYWH(nsDependentSubstring aString); - bool ParseMozResolution(nsDependentSubstring aString); bool ParseMozSampleSize(nsDependentSubstring aString); // Media fragment information. diff --git a/netwerk/base/nsStandardURL.h b/netwerk/base/nsStandardURL.h index 0ca345572..eba85528c 100644 --- a/netwerk/base/nsStandardURL.h +++ b/netwerk/base/nsStandardURL.h @@ -72,7 +72,6 @@ public: static void InitGlobalObjects(); static void ShutdownGlobalObjects(); -public: /* internal -- HPUX compiler can't handle this being private */ // // location and length of an url segment relative to mSpec // diff --git a/netwerk/test/unit/test_bug650995.js b/netwerk/test/unit/test_bug650995.js index 3c1ea8d67..bf2e9fa7d 100644 --- a/netwerk/test/unit/test_bug650995.js +++ b/netwerk/test/unit/test_bug650995.js @@ -78,24 +78,14 @@ function InitializeCacheDevices(memDevice, diskDevice) { this.start = function() { prefService.setBoolPref("browser.cache.memory.enable", memDevice); if (memDevice) { - try { - cap = prefService.getIntPref("browser.cache.memory.capacity"); - } - catch(ex) { - cap = 0; - } + cap = prefService.getIntPref("browser.cache.memory.capacity", 0); if (cap == 0) { prefService.setIntPref("browser.cache.memory.capacity", 1024); } } prefService.setBoolPref("browser.cache.disk.enable", diskDevice); if (diskDevice) { - try { - cap = prefService.getIntPref("browser.cache.disk.capacity"); - } - catch(ex) { - cap = 0; - } + cap = prefService.getIntPref("browser.cache.disk.capacity", 0); if (cap == 0) { prefService.setIntPref("browser.cache.disk.capacity", 1024); } diff --git a/netwerk/test/unit/test_idn_blacklist.js b/netwerk/test/unit/test_idn_blacklist.js index 5ca0173bb..aea45d706 100644 --- a/netwerk/test/unit/test_idn_blacklist.js +++ b/netwerk/test/unit/test_idn_blacklist.js @@ -121,12 +121,7 @@ const testcases = [ function run_test() { var pbi = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch); var oldProfile = pbi.getCharPref("network.IDN.restriction_profile", "moderate"); - var oldWhiteListCom; - try { - oldWhitelistCom = pbi.getBoolPref("network.IDN.whitelist.com"); - } catch(e) { - oldWhitelistCom = false; - } + var oldWhitelistCom = pbi.getBoolPref("network.IDN.whitelist.com", false); var idnService = Cc["@mozilla.org/network/idn-service;1"].getService(Ci.nsIIDNService); pbi.setCharPref("network.IDN.restriction_profile", "moderate"); diff --git a/netwerk/test/unit/test_idn_urls.js b/netwerk/test/unit/test_idn_urls.js index 06a53032b..358854093 100644 --- a/netwerk/test/unit/test_idn_urls.js +++ b/netwerk/test/unit/test_idn_urls.js @@ -295,12 +295,7 @@ const profiles = ["ASCII", "high", "moderate"]; function run_test() { var pbi = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch); var oldProfile = pbi.getCharPref("network.IDN.restriction_profile", "moderate"); - var oldWhiteListCom; - try { - oldWhitelistCom = pbi.getBoolPref("network.IDN.whitelist.com"); - } catch(e) { - oldWhitelistCom = false; - } + var oldWhitelistCom = pbi.getBoolPref("network.IDN.whitelist.com", false); var idnService = Cc["@mozilla.org/network/idn-service;1"].getService(Ci.nsIIDNService); for (var i = 0; i < profiles.length; ++i) { |