Closed Bug 839751 Opened 9 years ago Closed 9 years ago

"Assertion failure: i < argc_" with localeCompare

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: jruderman, Assigned: mozillabugs)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(3 files)

Attached file browser testcase
Assertion failure: i < argc_, at jsapi.h:741
Attached file stack trace
Something's whacked, because the operator[] there is clearly guarded by args.length() > 0.  I can't reproduce this in a shell, and I see no reason why shell would behave differently from browser for this.
I overlooked the assignment
   args[0].setString(thatStr);
which is only reached if an embedder (such as the browser) installs a callback. I don't see a reason for this assignment to exist - maybe it was a pre-RootedString attempt at rooting thatStr?

A different puzzle - how are we even getting here? The String constructor isn't supposed to have a localeCompare property - is that yet another wacko extension?
Attached patch patchSplinter Review
Removed the statement that caused the assertion to fail.
Assignee: general → mozillabugs
Status: NEW → ASSIGNED
Attachment #712161 - Flags: review?(jwalden+bmo)
Comment on attachment 712161 [details] [diff] [review]
patch

Review of attachment 712161 [details] [diff] [review]:
-----------------------------------------------------------------

Sigh.  |args[n]| shouldn't be mutable.  :-(
Attachment #712161 - Flags: review?(jwalden+bmo) → review+
Attachment #712161 - Flags: checkin?(jwalden+bmo)
OS: Mac OS X → All
Hardware: x86_64 → All
Target Milestone: --- → mozilla21
https://hg.mozilla.org/mozilla-central/rev/7b379cdbf900
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.