- Timestamp:
- Feb 11, 2013, 8:53:47 PM (13 years ago)
- Location:
- trunk/icedtea-web
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/icedtea-web
-
Property svn:mergeinfo
set to
/branches/vendor/sourceforge/icedtea-web/1.3 merged eligible /branches/vendor/sourceforge/icedtea-web/current merged eligible
-
Property svn:mergeinfo
set to
-
trunk/icedtea-web/plugin/icedteanp/IcedTeaJavaRequestProcessor.cc
r358 r418 921 921 { 922 922 className = "java.lang.String"; 923 #if MOZILLA_VERSION_COLLAPSED < 1090200 924 stringArg += NPVARIANT_TO_STRING(variant).utf8characters; 925 #else 926 stringArg += NPVARIANT_TO_STRING(variant).UTF8Characters; 927 #endif 923 stringArg = IcedTeaPluginUtilities::NPVariantAsString(variant); 928 924 } else if (NPVARIANT_IS_OBJECT(variant)) 929 925 { … … 938 934 PLUGIN_DEBUG("NPObject is not a Java object\n"); 939 935 NPIdentifier length_id = browser_functions.getstringidentifier("length"); 936 bool isJSObjectArray = false; 940 937 941 938 // FIXME: We currently only handle <= 2 dim arrays. Do we really need more though? … … 953 950 IcedTeaPluginUtilities::itoa(NPVARIANT_TO_INT32(length), &length_str); 954 951 955 if (NPVARIANT_TO_INT32(length) > 0)952 if (NPVARIANT_TO_INT32(length) >= 0) 956 953 { 957 954 NPIdentifier id_0 = browser_functions.getintidentifier(0); … … 973 970 getArrayTypeForJava(instance, first_element, &java_array_type); 974 971 } 975 } else 976 java_array_type.append("jsobject"); 972 } 973 974 // For JSObject arrays, we create a regular object (accessible via JSObject.getSlot()) 975 if (NPVARIANT_TO_INT32(length) < 0 || !java_array_type.compare("jsobject")) 976 { 977 isJSObjectArray = true; 978 goto createRegularObject; 979 } 977 980 978 981 java_result = java_request.newArray(java_array_type, length_str); … … 1012 1015 // Got here => no errors above. We're good to return! 1013 1016 return; 1014 } else // Else it is not an array 1017 } 1018 1019 createRegularObject: 1020 if (!IcedTeaPluginUtilities::isObjectJSArray(instance, obj) || isJSObjectArray) // Else it is not an array 1015 1021 { 1016 1022
Note:
See TracChangeset
for help on using the changeset viewer.