Closed Bug 358965 Opened 13 years ago Closed 13 years ago

XMLList.prototype.contains() no longer work

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

VERIFIED FIXED

People

(Reporter: igor, Assigned: igor)

References

Details

(Keywords: regression, verified1.8.0.9, verified1.8.1.1, Whiteboard: [sg:nse])

Attachments

(1 file)

The fix for bug 354145 introduced a regression in XMLList.prototype.contains implementation in xml_contains() from jsxml.c. The C code always returns false for false results which silently breaks script execution.

For example, after
<><a/><b/></>.contains(<c/>);
the rest of the code is not executed.

I mark the bug as restricted as 354145 is.
Depends on: 354145
Flags: blocking1.8.1.1?
Flags: blocking1.8.0.9?
Attached patch Fix v1Splinter Review
Attachment #244260 - Flags: review?(brendan)
Comment on attachment 244260 [details] [diff] [review]
Fix v1

I have to do a better job reviewing... air travel has taken its toll....

Please hook this up to go into js1.7src and 1.8.1.1 if it's a followup to a fix slated for those targets.

/be
Attachment #244260 - Flags: review?(brendan) → review+
I committed the patch from comment 1 to the trunk: 

Checking in jsxml.c;
/cvsroot/mozilla/js/src/jsxml.c,v  <--  jsxml.c
new revision: 3.136; previous revision: 3.135
done
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Blocks: js1.7src
Comment on attachment 244260 [details] [diff] [review]
Fix v1

This is a regression fix for the security fix.
Attachment #244260 - Flags: approval1.8.1.1?
Attachment #244260 - Flags: approval1.8.0.9?
Flags: in-testsuite+
verified fixed 1.9 20061103 windows/linux
Status: RESOLVED → VERIFIED
Flags: blocking1.8.1.1?
Flags: blocking1.8.1.1+
Flags: blocking1.8.0.9?
Flags: blocking1.8.0.9+
Keywords: regression
Whiteboard: [sg:nse]
Comment on attachment 244260 [details] [diff] [review]
Fix v1

Approved for 1.8.0/1.8 branches, a=dveditz for drivers
Attachment #244260 - Flags: approval1.8.1.1?
Attachment #244260 - Flags: approval1.8.1.1+
Attachment #244260 - Flags: approval1.8.0.9?
Attachment #244260 - Flags: approval1.8.0.9+
Group: security
I committed the patch from comment 1 to MOZILLA_1_8_BRANCH:

Checking in jsxml.c;
/cvsroot/mozilla/js/src/jsxml.c,v  <--  jsxml.c
new revision: 3.50.2.55; previous revision: 3.50.2.54
done
Keywords: fixed1.8.1.1
I committed the patch from comment 1 to MOZILLA_1_8_0_BRANCH:

Checking in jsxml.c;
/cvsroot/mozilla/js/src/jsxml.c,v  <--  jsxml.c
new revision: 3.50.2.15.2.26; previous revision: 3.50.2.15.2.25
done
Keywords: fixed1.8.0.9
verified fixed 1.8.0.9,1.8.1.1 20061108 windows/linux/mac*
You need to log in before you can comment on or make changes to this bug.