Closed Bug 1117593 Opened 5 years ago Closed 5 years ago

Fix handling of impossible cases in txEarlyEvalContext

Categories

(Core :: XSLT, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: njn, Assigned: njn)

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: 5 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.