Closed Bug 1117593 Opened 9 years ago Closed 9 years ago

Fix handling of impossible cases in txEarlyEvalContext

Categories

(Core :: XSLT, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(1 file)

cppcheck says this:

> dom/xslt/xpath/txXPathOptimizer.cpp:53: error: Null pointer dereference

It doesn't really matter because this function should never be reached. But the comment is misleading -- deref'ing 0 won't give us an invalid node, it will cause a crash -- and we have MOZ_CRASH now which is better.
If we're going to crash in getContextNode(), we might as well crash in all the
other impossible cases.
Attachment #8543704 - Flags: review?(peterv)
Attachment #8543704 - Flags: review?(peterv) → review+
https://hg.mozilla.org/mozilla-central/rev/eb0d05a27922
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: