bug 565138 - follow up r=vlad
authorBrad Lassey <blassey@mozilla.com>
Tue, 15 Jun 2010 19:39:43 -0400
changeset 43670 57184aee66cca0bfcb0c0ade2450cff19664d7f9
parent 43669 db3e8b1ecb265d389707f60426f6478ab64c5a6b
child 43671 b48e3441abcbbe69f7a1d7b5f977e54225477c9f
push id13845
push userblassey@mozilla.com
push dateTue, 15 Jun 2010 23:40:15 +0000
treeherdermozilla-central@57184aee66cc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvlad
bugs565138
milestone1.9.3a6pre
first release with
nightly win64
57184aee66cc / 3.7a6pre / 20100615170355 / files
nightly linux32
nightly linux64
nightly mac
nightly win32
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly win64
bug 565138 - follow up r=vlad
uriloader/exthandler/android/nsAndroidHandlerApp.cpp
widget/src/android/AndroidBridge.cpp
widget/src/android/AndroidJavaWrappers.cpp
--- a/uriloader/exthandler/android/nsAndroidHandlerApp.cpp
+++ b/uriloader/exthandler/android/nsAndroidHandlerApp.cpp
@@ -80,12 +80,11 @@ nsresult nsAndroidHandlerApp::Equals(nsI
   nsCOMPtr<nsAndroidHandlerApp> aApp = do_QueryInterface(aHandlerApp);
   *aRetval = aApp && aApp->mName.Equals(mName) &&
     aApp->mDescription.Equals(mDescription);
   return NS_OK;
 }
 
 nsresult nsAndroidHandlerApp::LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext)
 {
-  nsCAutoString uristr;
-  aURI->GetAsciiSpec(uristr);
-  return NS_OK;
+  // XXX: need implementation 
+  return NS_ERROR_NOT_IMPLEMENTED;
 }
--- a/widget/src/android/AndroidBridge.cpp
+++ b/widget/src/android/AndroidBridge.cpp
@@ -212,23 +212,26 @@ AndroidBridge::NotifyXreExit()
 {
     ALOG("xre exiting");
     mJNIEnv->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyXreExit);
 }
 
 void
 AndroidBridge::GetHandlersForMimeType(const char *aMimeType, nsStringArray* aStringArray)
 {
+    NS_PRECONDITION(aStringArray != nsnull, "null array pointer passed in");
     AutoLocalJNIFrame jniFrame;
     NS_ConvertUTF8toUTF16 wMimeType(aMimeType);
     jstring jstr = mJNIEnv->NewString(wMimeType.get(), wMimeType.Length());
     jobject obj = mJNIEnv->CallStaticObjectMethod(mGeckoAppShellClass, 
                                                   jGetHandlersForMimeType, 
                                                   jstr);
     jobjectArray arr = static_cast<jobjectArray>(obj);
+    if (!arr)
+        return;
     jsize len = mJNIEnv->GetArrayLength(arr);
     for (jsize i = 0; i < len; i+=2) {
         jstring jstr = static_cast<jstring>(mJNIEnv->GetObjectArrayElement(arr, i));
         nsJNIString jniStr(jstr);
         aStringArray->AppendString(jniStr);
     } 
 }
 
--- a/widget/src/android/AndroidJavaWrappers.cpp
+++ b/widget/src/android/AndroidJavaWrappers.cpp
@@ -406,14 +406,18 @@ AndroidRect::Init(JNIEnv *jenv, jobject 
         mLeft = 0;
         mRight = 0;
         mBottom = 0;
     }
 }
 
 nsJNIString::nsJNIString(jstring jstr)
 {
+    if (!jstr) {
+        SetIsVoid(PR_TRUE);
+        return;
+    }
     const jchar* jCharPtr = JNI()->GetStringChars(jstr, false);
     nsresult rv;
     Assign(jCharPtr);
     JNI()->ReleaseStringChars(jstr, jCharPtr);
 
 }