From f1e863a490ae20173210a53f516e146ebc677a36 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 20 Feb 2018 10:06:50 +0100 Subject: Remove more Vista checks in dom/media --- dom/media/MediaManager.cpp | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) (limited to 'dom/media/MediaManager.cpp') diff --git a/dom/media/MediaManager.cpp b/dom/media/MediaManager.cpp index 96e2c23e0..97a6855d9 100644 --- a/dom/media/MediaManager.cpp +++ b/dom/media/MediaManager.cpp @@ -1853,20 +1853,18 @@ MediaManager::GetNonE10sParent() MediaManager::StartupInit() { #ifdef WIN32 - if (IsVistaOrLater() && !IsWin8OrLater()) { - // Bug 1107702 - Older Windows fail in GetAdaptersInfo (and others) if the - // first(?) call occurs after the process size is over 2GB (kb/2588507). - // Attempt to 'prime' the pump by making a call at startup. - unsigned long out_buf_len = sizeof(IP_ADAPTER_INFO); - PIP_ADAPTER_INFO pAdapterInfo = (IP_ADAPTER_INFO *) moz_xmalloc(out_buf_len); - if (GetAdaptersInfo(pAdapterInfo, &out_buf_len) == ERROR_BUFFER_OVERFLOW) { - free(pAdapterInfo); - pAdapterInfo = (IP_ADAPTER_INFO *) moz_xmalloc(out_buf_len); - GetAdaptersInfo(pAdapterInfo, &out_buf_len); - } - if (pAdapterInfo) { - free(pAdapterInfo); - } + // Bug 1107702 - Some Windows versions fail in GetAdaptersInfo (and others) + // if the first(?) call occurs after the process size is over 2GB (kb/2588507). + // Attempt to 'prime' the pump by making a call at startup. + unsigned long out_buf_len = sizeof(IP_ADAPTER_INFO); + PIP_ADAPTER_INFO pAdapterInfo = (IP_ADAPTER_INFO *) moz_xmalloc(out_buf_len); + if (GetAdaptersInfo(pAdapterInfo, &out_buf_len) == ERROR_BUFFER_OVERFLOW) { + free(pAdapterInfo); + pAdapterInfo = (IP_ADAPTER_INFO *) moz_xmalloc(out_buf_len); + GetAdaptersInfo(pAdapterInfo, &out_buf_len); + } + if (pAdapterInfo) { + free(pAdapterInfo); } #endif } @@ -2130,19 +2128,11 @@ if (privileged) { case MediaSourceEnum::Application: case MediaSourceEnum::Window: // Deny screensharing request if support is disabled, or - // the requesting document is not from a host on the whitelist, or - // we're on WinXP until proved that it works + // the requesting document is not from a host on the whitelist if (!Preferences::GetBool(((videoType == MediaSourceEnum::Browser)? "media.getusermedia.browser.enabled" : "media.getusermedia.screensharing.enabled"), false) || -#if defined(XP_WIN) - ( - // Allow tab sharing for all platforms including XP - (videoType != MediaSourceEnum::Browser) && - !Preferences::GetBool("media.getusermedia.screensharing.allow_on_old_platforms", - false) && !IsVistaOrLater()) || -#endif (!privileged && !HostIsHttps(*docURI))) { RefPtr error = new MediaStreamError(aWindow, -- cgit v1.2.3