Closed Bug 7771 Opened 25 years ago Closed 25 years ago

liveconnect - sorting a java byte array crashes lcshell

Categories

(Core :: JavaScript Engine, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: cbegle, Assigned: fur)

References

()

Details

following test is crashing the lcshell:

js> load("d:/mozsrc/mozilla/js/tests/lc3/shell.js")
js> load("d:/mozsrc/mozilla/js/tests/lc3/ArrayMethods/byte-001.js")

stack trace to follow.
Summary: liveconnect test crash → liveconnect - sorting a java byte array crashes lcshell
well it's failing with a NoSuchMethod error but i can't get a decent stack
trace.  sorry.  the test case in the URL above works and here's a simpler test
case:

js> b = new java.lang.String("hi, fur").getBytes()
[B@206b28
js> b.sort()

this is supposed to test applying JS methods to java arrays.  applying
Array.prototype.reverse and join seem to work okay:

js> b = new java.lang.String("hi, fur").getBytes()
[B@206b2d
js> b.reverse()
[B@206b2d
js> b.join()
114,117,102,32,44,105,104
Status: NEW → ASSIGNED
Target Milestone: M7
This is a bug in the JS array code.  It's assuming that any object passed to
sort() is a native JS Array(), and ECMA says that ain't necessarily so.  The
only thing I don't understand is how this worked before.  Is this a new LC test
?
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed in SpiderMonkey140_BRANCH
Status: RESOLVED → VERIFIED
verified. thanks fur
You need to log in before you can comment on or make changes to this bug.