liveconnect - sorting a java byte array crashes lcshell

VERIFIED FIXED in M7

Status

()

Core
JavaScript Engine
P3
normal
VERIFIED FIXED
19 years ago
16 years ago

People

(Reporter: cbegle, Assigned: Scott Furman)

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

19 years ago
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.
(Reporter)

Updated

19 years ago
Summary: liveconnect test crash → liveconnect - sorting a java byte array crashes lcshell
(Reporter)

Comment 1

19 years ago
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
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
Target Milestone: M7
(Assignee)

Comment 2

19 years ago
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
?
(Assignee)

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 3

19 years ago
Fixed in SpiderMonkey140_BRANCH
(Reporter)

Updated

19 years ago
Status: RESOLVED → VERIFIED
(Reporter)

Comment 4

19 years ago
verified. thanks fur
You need to log in before you can comment on or make changes to this bug.