diff options
Diffstat (limited to 'dom')
-rw-r--r-- | dom/media/GraphDriver.cpp | 5 | ||||
-rw-r--r-- | dom/media/MediaManager.cpp | 31 | ||||
-rw-r--r-- | dom/media/MediaManager.h | 1 | ||||
-rw-r--r-- | dom/plugins/base/npfunctions.h | 4 | ||||
-rw-r--r-- | dom/plugins/base/nptypes.h | 19 |
5 files changed, 17 insertions, 43 deletions
diff --git a/dom/media/GraphDriver.cpp b/dom/media/GraphDriver.cpp index eacc7686f..0a38e2e24 100644 --- a/dom/media/GraphDriver.cpp +++ b/dom/media/GraphDriver.cpp @@ -28,11 +28,6 @@ StaticRefPtr<nsIThreadPool> AsyncCubebTask::sThreadPool; struct AutoProfilerUnregisterThread { - // The empty ctor is used to silence a pre-4.8.0 GCC unused variable warning. - AutoProfilerUnregisterThread() - { - } - ~AutoProfilerUnregisterThread() { profiler_unregister_thread(); diff --git a/dom/media/MediaManager.cpp b/dom/media/MediaManager.cpp index 1b7a05d38..0b6fd4b43 100644 --- a/dom/media/MediaManager.cpp +++ b/dom/media/MediaManager.cpp @@ -1260,13 +1260,6 @@ GetSources(MediaEngine *engine, MediaSourceEnum aSrcType, } } -// TODO: Remove once upgraded to GCC 4.8+ on linux. Bogus error on static func: -// error: 'this' was not captured for this lambda function - -static auto& MediaManager_GetInstance = MediaManager::GetInstance; -static auto& MediaManager_ToJSArray = MediaManager::ToJSArray; -static auto& MediaManager_AnonymizeDevices = MediaManager::AnonymizeDevices; - already_AddRefed<MediaManager::PledgeChar> MediaManager::SelectSettings( MediaStreamConstraints& aConstraints, @@ -1326,7 +1319,7 @@ MediaManager::SelectSettings( } } NS_DispatchToMainThread(NewRunnableFrom([id, badConstraint]() mutable { - RefPtr<MediaManager> mgr = MediaManager_GetInstance(); + RefPtr<MediaManager> mgr = MediaManager::GetInstance(); RefPtr<PledgeChar> p = mgr->mOutstandingCharPledges.Remove(id); if (p) { p->Resolve(badConstraint); @@ -1586,7 +1579,7 @@ MediaManager::EnumerateRawDevices(uint64_t aWindowId, fakeBackend = new MediaEngineDefault(); } if ((!fakeCams && hasVideo) || (!fakeMics && hasAudio)) { - RefPtr<MediaManager> manager = MediaManager_GetInstance(); + RefPtr<MediaManager> manager = MediaManager::GetInstance(); realBackend = manager->GetBackend(aWindowId); } @@ -1611,7 +1604,7 @@ MediaManager::EnumerateRawDevices(uint64_t aWindowId, SourceSet* handoff = result.release(); NS_DispatchToMainThread(NewRunnableFrom([id, handoff]() mutable { UniquePtr<SourceSet> result(handoff); // grab result - RefPtr<MediaManager> mgr = MediaManager_GetInstance(); + RefPtr<MediaManager> mgr = MediaManager::GetInstance(); if (!mgr) { return NS_OK; } @@ -1884,7 +1877,7 @@ int MediaManager::AddDeviceChangeCallback(DeviceChangeCallback* aCallback) { bool fakeDeviceChangeEventOn = mPrefs.mFakeDeviceChangeEventOn; MediaManager::PostTask(NewTaskFrom([fakeDeviceChangeEventOn]() { - RefPtr<MediaManager> manager = MediaManager_GetInstance(); + RefPtr<MediaManager> manager = MediaManager::GetInstance(); manager->GetBackend(0)->AddDeviceChangeCallback(manager); if (fakeDeviceChangeEventOn) manager->GetBackend(0)->SetFakeDeviceChangeEvents(); @@ -2404,7 +2397,7 @@ MediaManager::EnumerateDevicesImpl(uint64_t aWindowId, p->Then([id, aWindowId, aVideoType, aAudioType, aFake](const nsCString& aOriginKey) mutable { MOZ_ASSERT(NS_IsMainThread()); - RefPtr<MediaManager> mgr = MediaManager_GetInstance(); + RefPtr<MediaManager> mgr = MediaManager::GetInstance(); RefPtr<PledgeSourceSet> p = mgr->EnumerateRawDevices(aWindowId, aVideoType, aAudioType, aFake); @@ -2412,7 +2405,7 @@ MediaManager::EnumerateDevicesImpl(uint64_t aWindowId, UniquePtr<SourceSet> devices(aDevices); // secondary result // Only run if window is still on our active list. - RefPtr<MediaManager> mgr = MediaManager_GetInstance(); + RefPtr<MediaManager> mgr = MediaManager::GetInstance(); if (!mgr) { return NS_OK; } @@ -2420,7 +2413,7 @@ MediaManager::EnumerateDevicesImpl(uint64_t aWindowId, if (!p || !mgr->IsWindowStillActive(aWindowId)) { return NS_OK; } - MediaManager_AnonymizeDevices(*devices, aOriginKey); + MediaManager::AnonymizeDevices(*devices, aOriginKey); p->Resolve(devices.release()); return NS_OK; }); @@ -2459,12 +2452,12 @@ MediaManager::EnumerateDevices(nsPIDOMWindowInner* aWindow, fake); p->Then([onSuccess, windowId, listener](SourceSet*& aDevices) mutable { UniquePtr<SourceSet> devices(aDevices); // grab result - RefPtr<MediaManager> mgr = MediaManager_GetInstance(); + RefPtr<MediaManager> mgr = MediaManager::GetInstance(); mgr->RemoveFromWindowList(windowId, listener); - nsCOMPtr<nsIWritableVariant> array = MediaManager_ToJSArray(*devices); + nsCOMPtr<nsIWritableVariant> array = MediaManager::ToJSArray(*devices); onSuccess->OnSuccess(array); }, [onFailure, windowId, listener](MediaStreamError*& reason) mutable { - RefPtr<MediaManager> mgr = MediaManager_GetInstance(); + RefPtr<MediaManager> mgr = MediaManager::GetInstance(); mgr->RemoveFromWindowList(windowId, listener); onFailure->OnError(reason); }); @@ -2501,7 +2494,7 @@ MediaManager::GetUserMediaDevices(nsPIDOMWindowInner* aWindow, RefPtr<GetUserMediaTask> task; if (!aCallID.Length() || aCallID == callID) { if (mActiveCallbacks.Get(callID, getter_AddRefs(task))) { - nsCOMPtr<nsIWritableVariant> array = MediaManager_ToJSArray(*task->mSourceSet); + nsCOMPtr<nsIWritableVariant> array = MediaManager::ToJSArray(*task->mSourceSet); onSuccess->OnSuccess(array); return NS_OK; } @@ -3286,7 +3279,7 @@ GetUserMediaCallbackMediaStreamListener::ApplyConstraintsToTrack( NS_DispatchToMainThread(NewRunnableFrom([id, windowId, rv, badConstraint]() mutable { MOZ_ASSERT(NS_IsMainThread()); - RefPtr<MediaManager> mgr = MediaManager_GetInstance(); + RefPtr<MediaManager> mgr = MediaManager::GetInstance(); if (!mgr) { return NS_OK; } diff --git a/dom/media/MediaManager.h b/dom/media/MediaManager.h index 548ddd938..92e1a2576 100644 --- a/dom/media/MediaManager.h +++ b/dom/media/MediaManager.h @@ -264,7 +264,6 @@ private: static nsresult GenerateUUID(nsAString& aResult); static nsresult AnonymizeId(nsAString& aId, const nsACString& aOriginKey); -public: // TODO: make private once we upgrade to GCC 4.8+ on linux. static void AnonymizeDevices(SourceSet& aDevices, const nsACString& aOriginKey); static already_AddRefed<nsIWritableVariant> ToJSArray(SourceSet& aDevices); private: diff --git a/dom/plugins/base/npfunctions.h b/dom/plugins/base/npfunctions.h index 7638a6488..83c8a9762 100644 --- a/dom/plugins/base/npfunctions.h +++ b/dom/plugins/base/npfunctions.h @@ -189,8 +189,8 @@ typedef struct _NPNetscapeFuncs { #endif #if defined(XP_UNIX) -/* GCC 3.3 and later support the visibility attribute. */ -#if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) +/* GCC supports the visibility attribute. */ +#if defined(__GNUC__) #define NP_VISIBILITY_DEFAULT __attribute__((visibility("default"))) #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) #define NP_VISIBILITY_DEFAULT __global diff --git a/dom/plugins/base/nptypes.h b/dom/plugins/base/nptypes.h index d0cef6540..1f8eba3c5 100644 --- a/dom/plugins/base/nptypes.h +++ b/dom/plugins/base/nptypes.h @@ -13,7 +13,7 @@ #if defined(WIN32) /* - * Win32 and OS/2 don't know C99, so define [u]int_16/32/64 here. The bool + * Win32 doesn't know C99, so define [u]int_16/32/64 here. The bool * is predefined tho, both in C and C++. */ typedef short int16_t; @@ -61,28 +61,15 @@ #include <inttypes.h> #include <stdbool.h> #endif -#elif defined(BEOS) - #include <inttypes.h> #else /* * For those that ship a standard C99 stdint.h header file, include - * it. Can't do the same for stdbool.h tho, since some systems ship - * with a stdbool.h file that doesn't compile! + * it. */ #include <stdint.h> #ifndef __cplusplus - #if !defined(__GNUC__) || (__GNUC__ > 2 || __GNUC_MINOR__ > 95) - #include <stdbool.h> - #else - /* - * GCC 2.91 can't deal with a typedef for bool, but a #define - * works. - */ - #define bool int - #define true 1 - #define false 0 - #endif + #include <stdbool.h> #endif #endif |