Node::getXPathParent is needed all over the place, ContextState::getParentNode should die

VERIFIED FIXED in mozilla0.9.5

Status

()

P1
normal
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: axel, Assigned: axel)

Tracking

Trunk
mozilla0.9.5
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

17 years ago
This bug is a split off from bug 76070.
The upcoming patch implements Node::getXPathParent, does the right thing to
source/xml/util/DOMHelper, and fixes the whitespace mess in
NodeDefinition::getBaseURI (just as I go).

Axel
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
Keywords: review
Priority: -- → P1
Target Milestone: --- → mozilla0.9.5
(Assignee)

Comment 1

17 years ago
Created attachment 48577 [details] [diff] [review]
getXPathParent.patch
(Assignee)

Updated

17 years ago
Blocks: 76070, 94471
(Assignee)

Updated

17 years ago
No longer blocks: 76070
(Assignee)

Updated

17 years ago
Blocks: 76070
Comment on attachment 48577 [details] [diff] [review]
getXPathParent.patch

r=peterv, now on to killing ProcessorState::getParentNode
Attachment #48577 - Flags: review+
Comment on attachment 48577 [details] [diff] [review]
getXPathParent.patch

rs=brendan@mozilla.org
Attachment #48577 - Flags: superreview+
(Assignee)

Comment 4

17 years ago
patch 48577 is in, leaving this bug open and morping it to kill
ContextState::getParentNode (which is ProcessorState::getParentNode).

Axel
Summary: Node::getXPathParent is needed all over the place → Node::getXPathParent is needed all over the place, ContextState::getParentNode should die
(Assignee)

Comment 5

17 years ago
Created attachment 49080 [details] [diff] [review]
second patch, kill ProcessorState::getParentNode alltogether
(Assignee)

Comment 6

17 years ago
added
 MBool LocationStep::matches(Node* node, Node* context, ContextState* cs) {
 
-    if ( !nodeExpr ) return MB_FALSE;
+    if (!nodeExpr || !node)
+        return MB_FALSE;
 
-    if ( !nodeExpr->matches(node, context, cs) ) return MB_FALSE;
+    if (!nodeExpr->matches(node, context, cs))
+        return MB_FALSE;

to make ::matches 0 crash safe. Thanx to sicking for catching this.
(the second one is just whity fun)

Axel
Comment on attachment 49080 [details] [diff] [review]
second patch, kill ProcessorState::getParentNode alltogether

r=sicking
Attachment #49080 - Flags: review+
Comment on attachment 49080 [details] [diff] [review]
second patch, kill ProcessorState::getParentNode alltogether

r=peterv
Comment on attachment 49080 [details] [diff] [review]
second patch, kill ProcessorState::getParentNode alltogether

sr=jst
Attachment #49080 - Flags: superreview+
(Assignee)

Comment 10

17 years ago
I forgot to note in the first landing that this is code by sicking, sorry for
that.

second stage landed, marking fixed.

Axel
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.