Closed Bug 374112 Opened 17 years ago Closed 17 years ago

This use of E4X setName causes "Assertion failure: !IS_EMPTY(nameqn->uri)"

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
critical

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Assigned: igor)

Details

(4 keywords)

Attachments

(1 file)

js> <a/>.setName(<b/>.name());
Assertion failure: !IS_EMPTY(nameqn->uri), at jsxml.c:7009

Seems harmless in opt.
Summary: This use os E4X setName causes "Assertion failure: !IS_EMPTY(nameqn->uri)" → This use of E4X setName causes "Assertion failure: !IS_EMPTY(nameqn->uri)"
Assignee: general → igor
Attached patch Fix v1Splinter Review
The assertion reflects the assumption that an empty namespace uri must not have null prefix. The only place that I have found where this is violated is during parsing in ParseNodeToQName where prefix is set to null for any uri. The patch fixes that. 

Surprisingly there are no regressions with the patch against the testsuite. But on the other hand this bug reflects precisely the fact that xml prefix coverage in the suite is close to zero.
Attachment #259031 - Flags: review?(brendan)
Comment on attachment 259031 [details] [diff] [review]
Fix v1

Thanks, r=me.

/be
Attachment #259031 - Flags: review?(brendan) → review+
Comment on attachment 259031 [details] [diff] [review]
Fix v1

Super-safe fix.

/be
Attachment #259031 - Flags: approval1.8.1.4?
Attachment #259031 - Flags: approval1.8.0.12?
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.150; previous revision: 3.149
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment on attachment 259031 [details] [diff] [review]
Fix v1

approved for 1.8.0.12 and 1.8.1.4, a=dveditz for release-drivers
Attachment #259031 - Flags: approval1.8.1.4?
Attachment #259031 - Flags: approval1.8.1.4+
Attachment #259031 - Flags: approval1.8.0.12?
Attachment #259031 - Flags: approval1.8.0.12+
Checking in regress-374112.js;
/cvsroot/mozilla/js/tests/e4x/Regress/regress-374112.js,v  <--  regress-374112.js
initial revision: 1.1
Flags: in-testsuite+
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.63; previous revision: 3.50.2.62
done
Keywords: fixed1.8.1.4
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.33; previous revision: 3.50.2.15.2.32
done
Keywords: fixed1.8.0.12
verified fixed linux, windows, mac* 1.8.0, 1.8.1, 1.9.0 shell 20070406
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: