Closed Bug 110584 Opened 23 years ago Closed 21 years ago

Missing call to jsj_ExitJava

Categories

(Core Graveyard :: Java: Live Connect, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tjw, Assigned: yuanyi21)

Details

Attachments

(1 file)

JavaArray_newEnumerate has a case statement for the enumation operation.  In the JSENUMERATE_NEXT there is:

    case JSENUMERATE_NEXT:
        index = JSVAL_TO_INT(*statep);
        if (index < array_length) {
            JS_ValueToId(cx, INT_TO_JSVAL(index), idp);
            index++;
            *statep = INT_TO_JSVAL(index);
            return JS_TRUE;
        }


  But, there should be a call to jsj_ExitJava() before the return.  Failure to do so leaves the recursion count on that JSJavaThreadState incorrect (and also screws up my new callbacks).
sorry for the miscategorization on the first pass.  guess I should log a bug against buzilla that the component should start as 'unset' and require being set.
Component: BiDi Hebrew & Arabic → Live Connect
reassing for real
Assignee: mkaply → rogerl
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: zach → pschwartau
Reassigning to Patrick - 
Assignee: rogerl → beard
taking...
Assignee: beard → kyle.yuan
so that we won't miss jsj_ExitJava any more.

I checked all other liveconnect code, this is the only place missing
jsj_ExitJava.
Attachment #140406 - Flags: review?(Xiaobin.Lu)
Comment on attachment 140406 [details] [diff] [review]
use |break| instead of |return| in |switch|

Looks good to me.
Attachment #140406 - Flags: review?(Xiaobin.Lu) → review+
Attachment #140406 - Flags: superreview?(brendan)
Comment on attachment 140406 [details] [diff] [review]
use |break| instead of |return| in |switch|

Tradition says the name of that JSBool variable should be "ok", not "result". 
Fix that sr=me.

/be
Attachment #140406 - Flags: superreview?(brendan) → superreview+
fixed with "result"->"ok" changed.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: