Bug 714715 - Variable is used before a null check in GeckoApp.launch [r=dougt]
authorMark Finkle <mfinkle@mozilla.com>
Tue, 03 Jan 2012 00:57:24 -0500
changeset 84901 172f007cc17cf9ae1c2c27656e992b88dfdc4f1b
parent 84900 03f3e1ebcd6462114e8b5b6d4129d6b58dc2beea
child 84902 1d00e560e0dc39ddec224cc8cf3f5e2484c29eed
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt
bugs714715
milestone12.0a1
Bug 714715 - Variable is used before a null check in GeckoApp.launch [r=dougt]
mobile/android/base/GeckoApp.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -387,25 +387,25 @@ abstract public class GeckoApp
     // Returns true when the intent is going to be handled by gecko launch
     boolean launch(Intent intent)
     {
         Log.w(LOGTAG, "zerdatime " + new Date().getTime() + " - launch");
         
         if (!checkAndSetLaunchState(LaunchState.Launching, LaunchState.Launched))
             return false;
 
-                String args = intent.getStringExtra("args");
-                if (args != null && args.contains("-profile")) {
-                    // XXX: TO-DO set mProfileDir to the path passed in
-                    mUserDefinedProfile = true;
-                }
-
         if (intent == null)
             intent = getIntent();
 
+        String args = intent.getStringExtra("args");
+        if (args != null && args.contains("-profile")) {
+            // XXX: TO-DO set mProfileDir to the path passed in
+            mUserDefinedProfile = true;
+        }
+
         prefetchDNS(intent.getData());
         new GeckoThread(intent, mLastUri, mLastTitle).start();
 
         return true;
     }
 
     @Override
     public boolean onCreateOptionsMenu(Menu menu)