[Libreoffice-commits] core.git: 3 commits - drawinglayer/source sal/osl vcl/aqua
Tor Lillqvist
tml at iki.fi
Mon Jul 29 08:29:55 PDT 2013
drawinglayer/source/primitive2d/textlayoutdevice.cxx | 1 +
sal/osl/unx/salinit.cxx | 5 ++++-
vcl/aqua/source/dtrans/DataFlavorMapping.cxx | 4 +---
3 files changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 4f27ff917237be96eec897d4af90a3379be904c6
Author: Tor Lillqvist <tml at iki.fi>
Date: Mon Jul 29 18:24:23 2013 +0300
Avoid SolarMutex assertion in a dbgutil build when exiting Impress
Change-Id: I903d078713007920574dcdb780e1dd301ce94bf6
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index abe3325..409f225 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -79,6 +79,7 @@ namespace
ImpTimedRefDev::~ImpTimedRefDev()
{
OSL_ENSURE(0L == mnUseCount, "destruction of a still used ImpTimedRefDev (!)");
+ const SolarMutexGuard aGuard;
delete mpVirDev;
}
commit 73a508f574995f09559c003cb810e5d2ff2691c2
Author: Tor Lillqvist <tml at iki.fi>
Date: Mon Jul 29 16:50:22 2013 +0300
Avoid crash on OS X: guarded fd exception
On OS X, a file descriptor that shows up as being of type "KQUEUE" in
lsof output is apparently created behind the scenes when starting a
thread. (Related to BSD kernel event queues: see man kqueue.) When we
re-exec ourselves on OS X, and then close all file descriptors >= 3,
closing such a KQUEUE fd causes a crash.
Guard against this by closing only regular files.
Change-Id: I5011bfbaed156b04248b6bddb2a1a58624bee3d4
5011bfbaed156b04248b6bddb2a1a58624bee3d4
diff --git a/sal/osl/unx/salinit.cxx b/sal/osl/unx/salinit.cxx
index c71c6a3..10553b6 100644
--- a/sal/osl/unx/salinit.cxx
+++ b/sal/osl/unx/salinit.cxx
@@ -23,6 +23,7 @@
#include <cassert>
#include <limits>
#include <unistd.h>
+#include <sys/stat.h>
#endif
#include "osl/process.h"
@@ -64,7 +65,9 @@ void sal_detail_initialize(int argc, char ** argv) {
}
assert(openMax >= 0 && openMax <= std::numeric_limits< int >::max());
for (int fd = 3; fd < openMax; ++fd) {
- close(fd);
+ struct stat s;
+ if (fstat(fd, &s) != -1 && S_ISREG(s.st_mode))
+ close(fd);
}
#endif
sal_initGlobalTimer();
commit 70f56860e4a9ee2a25abf64142a7f0ed4d446bfb
Author: Tor Lillqvist <tml at iki.fi>
Date: Mon Jul 29 14:16:05 2013 +0300
Avoid an unnecessary static initialisation
Change-Id: I204158ef6965cc9aa19c458f514e265ede8587f4
diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index 9458c57..c5a79b3 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -47,8 +47,6 @@ using namespace std;
namespace // private
{
- const Type CPPUTYPE_SEQINT8 = getCppuType((Sequence<sal_Int8>*)0);
-
/* Determine whether or not a DataFlavor is valid.
*/
bool isValidFlavor(const DataFlavor& aFlavor)
@@ -528,7 +526,7 @@ DataFlavor DataFlavorMapper::systemToOpenOfficeFlavor(NSString* systemDataFlavor
{
oOOFlavor.MimeType = aTryFlavor;
oOOFlavor.HumanPresentableName = OUString();
- oOOFlavor.DataType = CPPUTYPE_SEQINT8;
+ oOOFlavor.DataType = getCppuType((Sequence<sal_Int8>*)0);
}
return oOOFlavor;
More information about the Libreoffice-commits
mailing list