diff --git a/netwerk/base/ClosingService.cpp b/netwerk/base/ClosingService.cpp index b8117dd79b30..81c835239267 100644 --- a/netwerk/base/ClosingService.cpp +++ b/netwerk/base/ClosingService.cpp @@ -26,6 +26,7 @@ public: namespace mozilla { namespace net { +#ifndef MOZ_WIDGET_GONK static PRIOMethods sTcpUdpPRCloseLayerMethods; static PRIOMethods *sTcpUdpPRCloseLayerMethodsPtr = nullptr; static PRDescIdentity sTcpUdpPRCloseLayerId; @@ -68,6 +69,7 @@ TcpUdpPRCloseLayerClose(PRFileDesc *aFd) delete closingLayerSecret; return status; } +#endif //MOZ_WIDGET_GONK ClosingService* ClosingService::sInstance = nullptr; @@ -83,6 +85,7 @@ ClosingService::ClosingService() void ClosingService::Start() { +#ifndef MOZ_WIDGET_GONK if (!sTcpUdpPRCloseLayerMethodsPtr) { sTcpUdpPRCloseLayerId = PR_GetUniqueIdentity("TCP and UDP PRClose layer"); PR_ASSERT(PR_INVALID_IO_LAYER != sTcpUdpPRCloseLayerId); @@ -101,6 +104,7 @@ ClosingService::Start() delete service; } } +#endif } nsresult @@ -119,6 +123,12 @@ ClosingService::StartInternal() nsresult ClosingService::AttachIOLayer(PRFileDesc *aFd) { +#ifdef MOZ_WIDGET_GONK + + return NS_OK; + +#else + if (!sTcpUdpPRCloseLayerMethodsPtr) { return NS_OK; } @@ -143,6 +153,8 @@ ClosingService::AttachIOLayer(PRFileDesc *aFd) PR_DELETE(layer); } return NS_OK; + +#endif //MOZ_WIDGET_GONK } void @@ -171,12 +183,14 @@ ClosingService::PostRequest(PRFileDesc *aFd) void ClosingService::Shutdown() { +#ifndef MOZ_WIDGET_GONK MOZ_ASSERT(NS_IsMainThread()); if (sInstance) { sInstance->ShutdownInternal(); NS_RELEASE(sInstance); } +#endif //MOZ_WIDGET_GONK } void