Bug 516267: trying to load an empty ("") uri throw an error [r=mark.finkle]
authorVivien Nicolas <21@vingtetun.org>
Mon, 14 Sep 2009 00:49:09 -0400
changeset 65552 e2b70a0763d1d1682ffa3a5fcc667a87853ddd0d
parent 65551 54dcf697fc0d65656e295f97eb2ade3666b3691a
child 65553 33576779d3035236170046f15cba07e7a97950c2
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmark
bugs516267
Bug 516267: trying to load an empty ("") uri throw an error [r=mark.finkle]
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -474,20 +474,21 @@ var BrowserUI = {
     var urlString = this.getDisplayURI(browser);
     if (urlString == "about:blank")
       urlString = "";
 
     this._edit.value = urlString;
   },
 
   goToURI : function(aURI) {
-    this._edit.reallyClosePopup();
+    aURI = aURI || this._edit.value;
+    if (!aURI)
+      return;
 
-    if (!aURI)
-      aURI = this._edit.value;
+    this._edit.reallyClosePopup();
 
     var flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
     getBrowser().loadURIWithFlags(aURI, flags, null, null);
 
     gHistSvc.markPageAsTyped(gURIFixup.createFixupURI(aURI, 0));
   },
 
   search : function() {