From bd5c25eb2bd4bdd8dfb39b2e6f6c9e54a75a2141 Mon Sep 17 00:00:00 2001
From: Dragana Damjanovic
Date: Tue, 22 Sep 2015 05:54:00 +0200
Subject: [PATCH] Bug 1152046 - Disable ClosingService for Firefox OS.
r=mcmanus
--HG--
extra : rebase_source : 350323fe22cedd593837fd88f7c0798a142b569e
---
netwerk/base/ClosingService.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/netwerk/base/ClosingService.cpp b/netwerk/base/ClosingService.cpp
index b8117dd79b30..073db0a04671 100644
--- a/netwerk/base/ClosingService.cpp
+++ b/netwerk/base/ClosingService.cpp
@@ -83,6 +83,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 +102,7 @@ ClosingService::Start()
delete service;
}
}
+#endif
}
nsresult
@@ -119,6 +121,12 @@ ClosingService::StartInternal()
nsresult
ClosingService::AttachIOLayer(PRFileDesc *aFd)
{
+#ifdef MOZ_WIDGET_GONK
+
+ return NS_OK;
+
+#else
+
if (!sTcpUdpPRCloseLayerMethodsPtr) {
return NS_OK;
}
@@ -143,6 +151,8 @@ ClosingService::AttachIOLayer(PRFileDesc *aFd)
PR_DELETE(layer);
}
return NS_OK;
+
+#endif //MOZ_WIDGET_GONK
}
void
@@ -171,12 +181,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