Closed
Bug 55114
Opened 24 years ago
Closed 24 years ago
for... in loops not behaving as expected on Java strings
Categories
(Core Graveyard :: Java: Live Connect, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: pschwartau, Assigned: rogerl)
Details
(Keywords: crash, Whiteboard: [rtm++])
Getting failures on these LiveConnect test cases:
js/tests/lc2/Arrays/array-003.js
js/tests/lc3/forin/array-001.js
The problem seems to rest on how the characters of Java string objects
are being enumerated -
Assignee | ||
Comment 1•24 years ago
|
||
Here's a patch, need review/approval etc...
diff -u -r1.14 jsj_JavaArray.c
--- jsj_JavaArray.c 2000/08/26 02:30:19 1.14
+++ jsj_JavaArray.c 2000/10/03 23:18:43
@@ -252,6 +252,7 @@
old_reporter = JS_SetErrorReporter(cx, NULL);
result = access_java_array_element(cx, jEnv, obj, id, NULL, JS_FALSE);
+ if (result) *objp = obj;
JS_SetErrorReporter(cx, old_reporter);
jsj_ExitJava(jsj_env);
return result;
Status: NEW → ASSIGNED
Comment 4•24 years ago
|
||
This is crucial for correct functioning of LiveConnect Java array access. The fix
is very low risk.
Whiteboard: [rtm+]
Assignee | ||
Comment 5•24 years ago
|
||
looking for r=,a= comments etc
Comment 6•24 years ago
|
||
Marking "need info". Please get your review and super review and renominate.
Whiteboard: [rtm+] → [rtm+ need info]
Comment 7•24 years ago
|
||
a=brendan@netscape.com. Was this a regression in the code?
/be
Assignee | ||
Comment 8•24 years ago
|
||
yes, I think when the changes in the for..in stuff was going in, or maybe
earlier - we had a blank period on liveconnect testing.
Comment 9•24 years ago
|
||
r=mccabe.
I stepped through it and objp not being set causes us to mishandle the
enumeration. Not to mention that it's obviously missing.
I think fur-style would have the the then-clause on a new line :)
Assignee | ||
Comment 10•24 years ago
|
||
Fix checked in to trunk, appropriately en-furred.
Comment 12•24 years ago
|
||
Crash bug, no? If so, add crash keyword.
/be
Assignee | ||
Comment 13•24 years ago
|
||
It's not reported as a crash, just test failures. But that must be just lucky
since I guess there's likely to be garbage in *objp otherwise.
Keywords: crash
Comment 14•24 years ago
|
||
Small... stops crash.... rtm double plus.
Please land on N 6 branch asap.
Thanks,
Jim
Whiteboard: [rtm+] → [rtm++]
Assignee | ||
Comment 15•24 years ago
|
||
Fix checked in to branch
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 16•24 years ago
|
||
Verified fixed using debug and optimized LiveConnect shells built on WinNT:
2000-11-01 (trunk)
2000-11-05 (MN6 branch)
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•