parent
765ad082ac
commit
582c7194c9
@ -1,65 +0,0 @@
|
||||
From 09be9031ce3e3ffb6cc40f45ac5e1a4192adcb15 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Wed, 2 Mar 2011 11:09:41 +0000
|
||||
Subject: [PATCH] Resolves: fdo#33701 ensure node outlives path
|
||||
|
||||
The xpath on destruction needs the xmldoc to exist, so the reference
|
||||
to the doc-owning nodelist needs to be the first reference listed
|
||||
in the class in order that its dtor is called *after* the xpath
|
||||
dtor
|
||||
---
|
||||
unoxml/source/xpath/nodelist.cxx | 4 ++--
|
||||
unoxml/source/xpath/nodelist.hxx | 4 ++--
|
||||
unoxml/source/xpath/xpathobject.cxx | 2 +-
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/unoxml/source/xpath/nodelist.cxx b/unoxml/source/xpath/nodelist.cxx
|
||||
index b4e3313..884cf85 100644
|
||||
--- a/unoxml/source/xpath/nodelist.cxx
|
||||
+++ b/unoxml/source/xpath/nodelist.cxx
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
namespace XPath
|
||||
{
|
||||
- CNodeList::CNodeList(boost::shared_ptr<xmlXPathObject>& rxpathObj, const Reference< XNode >& contextNode)
|
||||
- : m_xContextNode(contextNode)
|
||||
+ CNodeList::CNodeList(const Reference< XNode >& rContextNode, boost::shared_ptr<xmlXPathObject>& rxpathObj)
|
||||
+ : m_xContextNode(rContextNode)
|
||||
, m_pNodeSet(0)
|
||||
{
|
||||
if (rxpathObj != NULL && rxpathObj->type == XPATH_NODESET)
|
||||
diff --git a/unoxml/source/xpath/nodelist.hxx b/unoxml/source/xpath/nodelist.hxx
|
||||
index 31b9b51..c917a7d 100644
|
||||
--- a/unoxml/source/xpath/nodelist.hxx
|
||||
+++ b/unoxml/source/xpath/nodelist.hxx
|
||||
@@ -53,12 +53,12 @@ namespace XPath
|
||||
class CNodeList : public cppu::WeakImplHelper1< XNodeList >
|
||||
{
|
||||
private:
|
||||
- boost::shared_ptr<xmlXPathObject> m_pXPathObj;
|
||||
const Reference< XNode > m_xContextNode;
|
||||
+ boost::shared_ptr<xmlXPathObject> m_pXPathObj;
|
||||
xmlNodeSetPtr m_pNodeSet;
|
||||
|
||||
public:
|
||||
- CNodeList(boost::shared_ptr<xmlXPathObject> &rxpathObj, const Reference< XNode >& contextNode);
|
||||
+ CNodeList(const Reference< XNode >& contextNode, boost::shared_ptr<xmlXPathObject> &rxpathObj);
|
||||
/**
|
||||
The number of nodes in the list.
|
||||
*/
|
||||
diff --git a/unoxml/source/xpath/xpathobject.cxx b/unoxml/source/xpath/xpathobject.cxx
|
||||
index 67a8f59..bbb8a5b 100644
|
||||
--- a/unoxml/source/xpath/xpathobject.cxx
|
||||
+++ b/unoxml/source/xpath/xpathobject.cxx
|
||||
@@ -86,7 +86,7 @@ namespace XPath
|
||||
*/
|
||||
Reference< XNodeList > SAL_CALL CXPathObject::getNodeList() throw (RuntimeException)
|
||||
{
|
||||
- return Reference< XNodeList >(new CNodeList(m_pXPathObj, m_xContextNode));
|
||||
+ return Reference< XNodeList >(new CNodeList(m_xContextNode, m_pXPathObj));
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
1.7.4.1
|
||||
|
@ -1,28 +0,0 @@
|
||||
From e65850b4411c59a5c664b002c6ab4ae385fd2261 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Mon, 13 Dec 2010 12:48:47 +0000
|
||||
Subject: [PATCH] valgrind: don't leave an evil thread running after main is completed
|
||||
|
||||
---
|
||||
configmgr/source/components.cxx | 5 ++++-
|
||||
1 files changed, 4 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
|
||||
index e6cfb10..44c2d32 100644
|
||||
--- a/configmgr/source/components.cxx
|
||||
+++ b/configmgr/source/components.cxx
|
||||
@@ -595,7 +595,10 @@ Components::Components(
|
||||
RTL_LOGFILE_TRACE_AUTHOR("configmgr", "sb", "end parsing");
|
||||
}
|
||||
|
||||
-Components::~Components() {}
|
||||
+Components::~Components()
|
||||
+{
|
||||
+ flushModifications();
|
||||
+}
|
||||
|
||||
void Components::parseFileLeniently(
|
||||
FileParser * parseFile, rtl::OUString const & url, int layer, Data & data,
|
||||
--
|
||||
1.7.4.1
|
||||
|
Loading…
Reference in new issue