Closed Bug 527217 Opened 16 years ago Closed 9 years ago

mixup of haystack and needle in isAncestor() in microformats.js

Categories

(Toolkit Graveyard :: Microformats, defect)

x86
All
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: nikita.ppv, Assigned: mkaply)

References

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20091106 Minefield/3.7a1pre (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20091106 Minefield/3.7a1pre (.NET CLR 3.5.30729) In the isAncestor() function (http://mxr.mozilla.org/mozilla-central/source/toolkit/components/microformats/src/Microformats.js#31) haystack and needle are mixed up in http://mxr.mozilla.org/mozilla-central/source/toolkit/components/microformats/src/Microformats.js#36. Should be if (parent == haystack.parentNode) As it is now haystack is an unused variable and the function will always return true because needle.parentNode == needle.parentNode. Reproducible: Always
Product: Firefox → Core
QA Contact: general → general
This code was added in http://hg.mozilla.org/mozilla-central/rev/38f706a14f29 , CCing mkaply and moving to Toolkit:Microformats.
Assignee: nobody → mozilla
Blocks: 427456
Status: UNCONFIRMED → NEW
Component: General → Microformats
Ever confirmed: true
Product: Core → Toolkit
QA Contact: general → microformats
Version: unspecified → Trunk
Old microformats code has been removed.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.