summaryrefslogtreecommitdiff
path: root/www/libxul/files/patch-bug945046
diff options
context:
space:
mode:
authorFlorian Smeets <flo@FreeBSD.org>2013-12-14 13:42:06 +0000
committerFlorian Smeets <flo@FreeBSD.org>2013-12-14 13:42:06 +0000
commit7efa77ad7c5cf3417d7fe8c89dbe949a8facca79 (patch)
tree3f75766ca5d76f6dd2367c583fb90b16519be03a /www/libxul/files/patch-bug945046
parentwww/py-django-dpaste: Update to 2.1 (Upstream is responsive, Thanks Martin!) (diff)
Update to nspr 4.10.2
Update to nss 3.15.3.1 Update firefox-esr and thunderbird to 24.2.0 Update firefox to 26.0 Update seamonkey to 2.23 - catch up with directory renames since USES=webplugins was introduced; fixes plugins not being automatically enabled after install - linux-firefox and linux-seamonkey can play HTML5 audio [2][3] and measure about:memory usage, again - dom.ipc.plugins.enabled->true no longer crash linux-firefox which makes some flash sites work again; as there's no nspluginwrapper in-between the infamous "youtube issue" never occurs - install DEBUG with symbols [3] and describe the option better [4] - enable dumping about:memory upon kill -65, kill -66 and GC/CC log upon kill -67 to a file under /tmp directory; linux-firefox uses kill -34, kill -35 and kill -36 respectively PR: ports/183861 [1] PR: ports/184006 [2] PR: ports/169896 [3] PR: ports/184285 [3] PR: ports/184286 [4] Security: dd116b19-64b3-11e3-868f-0025905a4771 In collaboration with: Jan Beich <jbeich@tormail.org>
Notes
Notes: svn path=/head/; revision=336446
Diffstat (limited to 'www/libxul/files/patch-bug945046')
-rw-r--r--www/libxul/files/patch-bug945046130
1 files changed, 130 insertions, 0 deletions
diff --git a/www/libxul/files/patch-bug945046 b/www/libxul/files/patch-bug945046
new file mode 100644
index 000000000000..2da32f78cd4c
--- /dev/null
+++ b/www/libxul/files/patch-bug945046
@@ -0,0 +1,130 @@
+diff --git config/system-headers config/system-headers
+index 432cba6..18a9627 100644
+--- config/system-headers
++++ config/system-headers
+@@ -1157,3 +1157,4 @@ unicode/uenum.h
+ unicode/unum.h
+ unicode/ustring.h
+ #endif
++libutil.h
+diff --git js/src/config/system-headers js/src/config/system-headers
+index 432cba6..18a9627 100644
+--- js/src/config/system-headers
++++ js/src/config/system-headers
+@@ -1157,3 +1157,4 @@ unicode/uenum.h
+ unicode/unum.h
+ unicode/ustring.h
+ #endif
++libutil.h
+diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
+index 9975621..b4b037d 100644
+--- toolkit/library/Makefile.in
++++ toolkit/library/Makefile.in
+@@ -289,6 +289,10 @@ OS_LIBS += $(call EXPAND_LIBNAME,kvm)
+ EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols
+ endif
+
++ifeq ($(OS_ARCH),FreeBSD)
++OS_LIBS += $(call EXPAND_LIBNAME,util)
++endif
++
+ ifeq ($(OS_ARCH),WINNT)
+ OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet wbemuuid)
+ ifdef ACCESSIBILITY
+diff --git xpcom/base/nsMemoryReporterManager.cpp xpcom/base/nsMemoryReporterManager.cpp
+index b8147c8..0ffb34e 100644
+--- xpcom/base/nsMemoryReporterManager.cpp
++++ xpcom/base/nsMemoryReporterManager.cpp
+@@ -153,6 +153,43 @@ static nsresult GetResidentFast(int64_t
+ return GetResident(n);
+ }
+
++#ifdef __FreeBSD__
++#include <libutil.h>
++
++static nsresult
++GetKinfoVmentrySelf(int64_t* prss)
++{
++ int cnt;
++ struct kinfo_vmentry *vmmap, *kve;
++ if ((vmmap = kinfo_getvmmap(getpid(), &cnt)) == NULL)
++ return NS_ERROR_FAILURE;
++
++ if (prss)
++ *prss = 0;
++
++ for (int i = 0; i < cnt; i++) {
++ kve = &vmmap[i];
++ if (prss)
++ *prss += kve->kve_private_resident;
++ }
++
++ free(vmmap);
++ return NS_OK;
++}
++
++#define HAVE_PRIVATE_REPORTER
++static nsresult
++GetPrivate(int64_t* aN)
++{
++ int64_t priv;
++ nsresult rv = GetKinfoVmentrySelf(&priv);
++ if (NS_SUCCEEDED(rv))
++ *aN = priv * getpagesize();
++
++ return NS_OK;
++}
++#endif // FreeBSD
++
+ #elif defined(SOLARIS)
+
+ #include <procfs.h>
+@@ -327,6 +364,24 @@ static nsresult GetResidentFast(int64_t
+ }
+
+ #define HAVE_PRIVATE_REPORTER
++static nsresult
++GetPrivate(int64_t* aN)
++{
++ PROCESS_MEMORY_COUNTERS_EX pmcex;
++ pmcex.cb = sizeof(PROCESS_MEMORY_COUNTERS_EX);
++
++ if (!GetProcessMemoryInfo(
++ GetCurrentProcess(),
++ (PPROCESS_MEMORY_COUNTERS) &pmcex, sizeof(pmcex))) {
++ return NS_ERROR_FAILURE;
++ }
++
++ *aN = pmcex.PrivateUsage;
++ return NS_OK;
++}
++#endif // XP_<PLATFORM>
++
++#ifdef HAVE_PRIVATE_REPORTER
+ class PrivateReporter MOZ_FINAL : public MemoryReporterBase
+ {
+ public:
+@@ -339,21 +394,10 @@ public:
+
+ NS_IMETHOD GetAmount(int64_t *aAmount)
+ {
+- PROCESS_MEMORY_COUNTERS_EX pmcex;
+- pmcex.cb = sizeof(PROCESS_MEMORY_COUNTERS_EX);
+-
+- if (!GetProcessMemoryInfo(
+- GetCurrentProcess(),
+- (PPROCESS_MEMORY_COUNTERS) &pmcex, sizeof(pmcex))) {
+- return NS_ERROR_FAILURE;
+- }
+-
+- *aAmount = pmcex.PrivateUsage;
+- return NS_OK;
++ return GetPrivate(aAmount);
+ }
+ };
+-
+-#endif // XP_<PLATFORM>
++#endif
+
+ #ifdef HAVE_VSIZE_AND_RESIDENT_REPORTERS
+ class VsizeReporter MOZ_FINAL : public MemoryReporterBase