M webclient/build-tests.xml
- re-activate some tests M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/PreferencesImpl.java - Make null an acceptable argument for prefValue. Make it mean, remove the pref. M webclient/src_moz/PreferencesImpl.cpp - make a null prefValue argument to nativeSetUnicharPref mean, ClearPref(). git-svn-id: svn://10.0.0.236/trunk@154682 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -111,22 +111,28 @@ Java_org_mozilla_webclient_impl_wrapper_1native_PreferencesImpl_nativeSetUnichar
|
||||
|
||||
const char * prefNameChars = (char *)::util_GetStringUTFChars(env,
|
||||
prefName);
|
||||
const jchar * prefValueChars = (jchar *)::util_GetStringChars(env,
|
||||
prefValue);
|
||||
if (nsnull == prefNameChars) {
|
||||
::util_ThrowExceptionToJava(env, "nativeSetUnicharPref: unable to extract Java string for pref name");
|
||||
rv = NS_ERROR_NULL_POINTER;
|
||||
goto OMWIWNPINSUP_CLEANUP;
|
||||
const jchar * prefValueChars = nsnull;
|
||||
if (nsnull != prefValue) {
|
||||
prefValueChars =
|
||||
(jchar *)::util_GetStringChars(env, prefValue);
|
||||
if (nsnull == prefNameChars) {
|
||||
::util_ThrowExceptionToJava(env, "nativeSetUnicharPref: unable to extract Java string for pref name");
|
||||
rv = NS_ERROR_NULL_POINTER;
|
||||
goto OMWIWNPINSUP_CLEANUP;
|
||||
}
|
||||
if (nsnull == prefValueChars) {
|
||||
::util_ThrowExceptionToJava(env, "nativeSetUnicharPref: unable to extract Java string for pref value");
|
||||
rv = NS_ERROR_NULL_POINTER;
|
||||
goto OMWIWNPINSUP_CLEANUP;
|
||||
}
|
||||
|
||||
rv = prefs->SetUnicharPref(prefNameChars,
|
||||
(const PRUnichar *) prefValueChars);
|
||||
}
|
||||
if (nsnull == prefValueChars) {
|
||||
::util_ThrowExceptionToJava(env, "nativeSetUnicharPref: unable to extract Java string for pref value");
|
||||
rv = NS_ERROR_NULL_POINTER;
|
||||
goto OMWIWNPINSUP_CLEANUP;
|
||||
else {
|
||||
rv = prefs->ClearUserPref(prefNameChars);
|
||||
}
|
||||
|
||||
rv = prefs->SetUnicharPref(prefNameChars,
|
||||
(const PRUnichar *) prefValueChars);
|
||||
|
||||
OMWIWNPINSUP_CLEANUP:
|
||||
|
||||
::util_ReleaseStringUTFChars(env, prefName, prefNameChars);
|
||||
|
||||
Reference in New Issue
Block a user