Bug 975837 - Fallback to the empty string when receiving null urls in enterEditingMode. r=lucasr
authorMichael Comella <michael.l.comella@gmail.com>
Fri, 21 Nov 2014 11:29:42 -0800
changeset 241211 50456b05b04178ce13065f37f423649e9c408f79
parent 241210 6fec67fdc58b5893cfb41165e282d0bfca5b6d2b
child 241212 87d4d6d5facc975177e54a4a60db0c70d64c59d2
child 241379 4bcc69eb4a27db09b2423c52c22a0c07baffd7d0
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr
bugs975837
milestone36.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 975837 - Fallback to the empty string when receiving null urls in enterEditingMode. r=lucasr
mobile/android/base/BrowserApp.java
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -1948,22 +1948,22 @@ public class BrowserApp extends GeckoApp
             // which we save whenever the user performs a search.
             url = (TextUtils.isEmpty(userRequested) ? tab.getURL() : userRequested);
         }
 
         enterEditingMode(url);
     }
 
     /**
-     * Enters editing mode with the specified URL. This method will
-     * always open the HISTORY page on about:home.
+     * Enters editing mode with the specified URL. If a null
+     * url is given, the empty String will be used instead.
      */
     private void enterEditingMode(String url) {
         if (url == null) {
-            throw new IllegalArgumentException("Cannot handle null URLs in enterEditingMode");
+            url = "";
         }
 
         if (mBrowserToolbar.isEditing() || mBrowserToolbar.isAnimating()) {
             return;
         }
 
         final Tab selectedTab = Tabs.getInstance().getSelectedTab();
         mTargetTabForEditingMode = (selectedTab != null ? selectedTab.getId() : null);