components/desktop/firefox/patches/firefox-29-sparc-xptcall.patch
changeset 5527 611b2d6efdfe
parent 5255 cea0e462549a
equal deleted inserted replaced
5526:570ac9aab8b2 5527:611b2d6efdfe
       
     1 See Mozilla bug #1153707 - [JavaScript Error: "invalid 'in' operand
       
     2 aLivemarkInfo"] when calling method: [mozIAsyncLivemarks::getLivemark].
       
     3 Has been sent upstream in the past but does not seem to have been accepted.
       
     4 
       
     5 diff --git a/js/xpconnect/src/XPCWrappedJSClass.cpp b/js/xpconnect/src/XPCWrappedJSClass.cpp
       
     6 --- a/js/xpconnect/src/XPCWrappedJSClass.cpp
       
     7 +++ b/js/xpconnect/src/XPCWrappedJSClass.cpp
       
     8 @@ -1295,21 +1295,9 @@
       
     9                  break;
       
    10          }
       
    11  
       
    12 -// see bug #961488
       
    13 -#if (defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(_AIX)) && \
       
    14 -    ((defined(__sparc) && !defined(__sparcv9) && !defined(__sparcv9__)) || \
       
    15 -    (defined(__powerpc__) && !defined (__powerpc64__)))
       
    16 -        if (type_tag == nsXPTType::T_JSVAL) {
       
    17 -            if (!XPCConvert::JSData2Native(*(void**)(&pv->val), val, type,
       
    18 -                                           &param_iid, nullptr))
       
    19 -                break;
       
    20 -        } else
       
    21 -#endif
       
    22 -        {
       
    23 -            if (!XPCConvert::JSData2Native(&pv->val, val, type,
       
    24 -                                           &param_iid, nullptr))
       
    25 -                break;
       
    26 -        }
       
    27 +        if (!XPCConvert::JSData2Native(&pv->val, val, type,
       
    28 +                                       &param_iid, nullptr))
       
    29 +            break;
       
    30      }
       
    31  
       
    32      // if any params were dependent, then we must iterate again to convert them.
       
    33 diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_solaris.cpp b/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_solaris.cpp
       
    34 --- a/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_solaris.cpp
       
    35 +++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_solaris.cpp
       
    36 @@ -52,13 +52,17 @@
       
    37 
       
    38          if(param.IsOut() || !type.IsArithmetic())
       
    39          {
       
    40 -            dp->val.p = (void*) *ap;
       
    41 +            if (type == nsXPTType::T_JSVAL)
       
    42 +                dp->val.p = *((void**)*ap);
       
    43 +            else
       
    44 +                dp->val.p = (void*) *ap;
       
    45 +
       
    46              continue;
       
    47          }
       
    48          // else
       
    49          switch(type)
       
    50          {
       
    51 -        case nsXPTType::T_I8     : dp->val.i8  = *((int32_t*)  ap);       break;
       
    52 +        case nsXPTType::T_I8     : dp->val.i8  = *((int32_t*) ap);       break;
       
    53          case nsXPTType::T_I16    : dp->val.i16 = *((int32_t*) ap);       break;
       
    54          case nsXPTType::T_I32    : dp->val.i32 = *((int32_t*) ap);       break;
       
    55          case nsXPTType::T_DOUBLE :