Bug 570981 - Remove URLBarSetURI's aValid parameter. r=gavin
authorDão Gottwald <dao@mozilla.com>
Fri, 11 Jun 2010 15:26:01 +0200
changeset 43544 4c811642b4039363df37dbbc0e5e3bd8ad1d0572
parent 43543 37ed46e84dfbb0921b61f9bd181386ff4d4e12cb
child 43545 e824d25382f721130ee7036a9cecb410417dca57
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)
reviewersgavin
bugs570981
milestone1.9.3a6pre
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 570981 - Remove URLBarSetURI's aValid parameter. r=gavin
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -2182,32 +2182,31 @@ function traceDocument()
 
 // Controls whether or not we do verbose tracing.
 function traceVerbose(verbose)
 {
   leakDetector.verbose = (verbose == "true");
 }
 #endif
 
-function URLBarSetURI(aURI, aValid) {
+function URLBarSetURI(aURI) {
   var value = gBrowser.userTypedValue;
   var valid = false;
 
   if (value == null) {
     let uri = aURI || getWebNavigation().currentURI;
 
     // Replace initial page URIs with an empty string
     // only if there's no opener (bug 370555).
     if (gInitialPages.indexOf(uri.spec) != -1)
       value = content.opener ? uri.spec : "";
     else
       value = losslessDecodeURI(uri);
 
-    let isBlank = (uri.spec == "about:blank");
-    valid = !isBlank && (!aURI || aValid);
+    valid = (uri.spec != "about:blank");
   }
 
   gURLBar.value = value;
   SetPageProxyState(valid ? "valid" : "invalid");
 }
 
 function losslessDecodeURI(aURI) {
   var value = aURI.spec;
@@ -4122,17 +4121,17 @@ var XULBrowserWindow = {
         gBrowser.setIcon(gBrowser.selectedTab, null);
 
       if (gURLBar) {
         // Strip off "wyciwyg://" and passwords for the location bar
         let uri = aLocationURI;
         try {
           uri = this._uriFixup.createExposableURI(uri);
         } catch (e) {}
-        URLBarSetURI(uri, true);
+        URLBarSetURI(uri);
 
         // Update starring UI
         PlacesStarButton.updateState();
       }
     }
     UpdateBackForwardCommands(gBrowser.webNavigation);
 
     if (gFindBarInitialized) {