Bug 1147992 - Be paranoid when reading strings from intents, yet again. r=mfinkle
authorRichard Newman <rnewman@mozilla.com>
Thu, 26 Mar 2015 16:55:45 -0700
changeset 264785 ca43c59519767a8bc22ecb3cc88df98e2eb7eefe
parent 264784 e4496ef0ca0b05b619e3691cde6291fe7135fd10
child 264786 d9c0f2a3a0a6b5f82725e038e9ccbc27028e2e11
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs1147992
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1147992 - Be paranoid when reading strings from intents, yet again. r=mfinkle
mobile/android/base/GeckoProfile.java
--- a/mobile/android/base/GeckoProfile.java
+++ b/mobile/android/base/GeckoProfile.java
@@ -22,16 +22,17 @@ import java.util.regex.Pattern;
 import org.json.JSONException;
 import org.json.JSONArray;
 import org.mozilla.gecko.GeckoProfileDirectories.NoMozillaDirectoryException;
 import org.mozilla.gecko.GeckoProfileDirectories.NoSuchProfileException;
 import org.mozilla.gecko.db.BrowserDB;
 import org.mozilla.gecko.db.LocalBrowserDB;
 import org.mozilla.gecko.db.StubBrowserDB;
 import org.mozilla.gecko.distribution.Distribution;
+import org.mozilla.gecko.mozglue.ContextUtils;
 import org.mozilla.gecko.mozglue.RobocopTarget;
 import org.mozilla.gecko.firstrun.FirstrunPane;
 import org.mozilla.gecko.util.INIParser;
 import org.mozilla.gecko.util.INISection;
 
 import android.app.Activity;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -148,17 +149,17 @@ public final class GeckoProfile {
             final GeckoApp geckoApp = (GeckoApp) context;
             if (geckoApp.mProfile != null) {
                 return geckoApp.mProfile;
             }
         }
 
         final String args;
         if (context instanceof Activity) {
-            args = ((Activity) context).getIntent().getStringExtra("args");
+            args = ContextUtils.getStringExtra(((Activity) context).getIntent(), "args");
         } else {
             args = null;
         }
 
         if (GuestSession.shouldUse(context, args)) {
             final GeckoProfile p = GeckoProfile.getOrCreateGuestProfile(context);
             if (isGeckoApp) {
                 ((GeckoApp) context).mProfile = p;