JDK-7165636 : Implement DTLite for IE
  • Type: Enhancement
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 7u6
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2012-05-01
  • Updated: 2013-09-11
  • Resolved: 2013-09-11
Related Reports
Relates :  
Description
7132539: Passing parameters to webstar app through DT does not work
was implemented in deployment toolkit for Mozilla branch only. Need to complete the implementation for IE.
Also implement recomendations from Alexey quoted below:

>   623     //if jvmargs is present then get array of elements
>   624     if (spDispEx->GetDispID(_bstr_t(L"jvmargs"), 0,&dispid) == S_OK) {
>   625         _variant_t varArray;
>   626         _variant_t varLen;
>   627
>   628         PROPERTYGET(spDispEx, dispid, dispparamsNoArgs, varArray)
>   629
>   630         IDispatchExPtr spArrDispEx(varArray);
>   631
>   632         //javascript array will have property named "length" with array size
>   633         // and then properties named "0" to "length-1" with array values
>   634         OLE_HRT(spArrDispEx->GetDispID(_bstr_t(L"length"), 0,&dispid))
>   635         PROPERTYGET(spArrDispEx, dispid, dispparamsNoArgs, varLen)
>   636
>   637         long len = (long) varLen;
>   638         for (int i = len; i>0; i--) {
>   639             _variant_t var;
>   640             //iterate backwards to use push_front (presumably a bit faster)
>   641             OLE_HRT(spArrDispEx->GetDispID(_bstr_t((_variant_t)(long) (i-1)), 0,&dispid))
>   642             PROPERTYGET(spArrDispEx, dispid, dispparamsNoArgs, var)
>   643
>   644             if (V_VT(&var) == VT_BSTR) {
>   645                 jvmargs.push_front(VARIANT_TO_BSTR(&var));
>   646             } else {
>   647                 //skip non string parameters
>   648             }
>   649         }
>   650     }
better avoid extra conversions and use local DISPID. Like:
>
>
>           for (long i = varLen; i>  0; --i) {
>               _variant_t var;
>               DISPIDar_dispid  = 0;
>               //iterate backwards to use push_front (presumably a bit faster)
>               OLE_HRT(spArrDispEx->GetDispID(_bstr_t(_variant_t(i-1)), 0,&ar_dispid))
>               PROPERTYGET(spArrDispEx,ar_dispid, dispparamsNoArgs, var)
>
>               if (V_VT(&var) == VT_BSTR) {
>                   jvmargs.push_front(VARIANT_TO_BSTR(&var));
>               } else {
>                   //skip non string parameters
>               }
>           }
>
>
> 5] Replace (*it).c_str() to it->c_str() 
    6] delete as pair to npstringToChar is wrong choice. Use delete[]

91 const char* str = npstringToChar(v);
92 if (str != NULL) {
93 jvmargs.push_front(str);
94 delete[] str;

Comments
EVALUATION Before we add support for vmargs/appagrs parameters we need to add DTLite support in IE because launchApp() on applet is not supported in IE.
04-05-2012