Closed
      
        Bug 110584
      
      
        Opened 23 years ago
          Closed 21 years ago
      
        
    
  
Missing call to jsj_ExitJava  
    Categories
(Core Graveyard :: Java: Live Connect, defect)
        Core Graveyard
          
        
        
      
        
    
        Java: Live Connect
          
        
        
      
        
    Tracking
(Not tracked)
        RESOLVED
        FIXED
        
    
  
People
(Reporter: tjw, Assigned: yuanyi21)
Details
Attachments
(1 file)
| 2.00 KB,
          patch         | xiaobin.lu
:
              
              review+ brendan
:
              
              superreview+ | Details | Diff | Splinter Review | 
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).
|   | Reporter | |
| Comment 1•23 years ago
           | ||
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
|   | ||
| Comment 2•23 years ago
           | ||
reassing for real
Assignee: mkaply → rogerl
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: zach → pschwartau
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 6•21 years ago
           | ||
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 7•21 years ago
           | ||
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
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•