Bug 697117 - Clean up some errors found at runtime [r=lucasr]
authorMark Finkle <mfinkle@mozilla.com>
Tue, 25 Oct 2011 11:49:22 -0400
changeset 83253 de62c3437bf86f4b26e7b76501fea4a5ea4ab886
parent 83252 aaf33b728e58b370746981168002ab080545e3f5
child 83254 79809866caf35f004fb9fc2fdb35b89d959a908c
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr
bugs697117
milestone10.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 697117 - Clean up some errors found at runtime [r=lucasr]
embedding/android/GeckoApp.java
mobile/chrome/content/browser.js
mobile/components/BrowserCLH.js
--- a/embedding/android/GeckoApp.java
+++ b/embedding/android/GeckoApp.java
@@ -814,17 +814,17 @@ abstract public class GeckoApp
         if (tab == null)
             return;
 
         try {
             URL url = new URL(tab.getURL());
             String faviconUrl = url.getProtocol() + "://" + url.getAuthority() + "/favicon.ico";
             new DownloadFaviconTask().execute(faviconUrl, "" + tabId);
         } catch (MalformedURLException e) {
-            Log.d(LOG_FILE_NAME, "Error loading favicon: " + e);
+            // Optional so not a real error
         }
     }
 
     private class DownloadFaviconTask extends AsyncTask<String, Void, Drawable> {
         private int tabId;
 
         protected Drawable doInBackground(String... args) {
             Drawable image = null;
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -474,17 +474,27 @@ var BrowserEventHandler = {
         if (target.hasAttribute("sizes"))
           json.sizes = target.getAttribute("sizes");
 
         sendMessageToJava({ gecko: json });
         break;
       }
 
       case "DOMTitleChanged": {
+        if (!aEvent.isTrusted)
+          return;
+
+        let contentWin = aEvent.target.defaultView;
+        if (contentWin != contentWin.top)
+          return;
+
         let browser = BrowserApp.getBrowserForDocument(aEvent.target);
+        if (!browser)
+          return;
+
         let tabID = BrowserApp.getTabForBrowser(browser).id;
         sendMessageToJava({
           gecko: {
             type: "DOMTitleChanged",
             tabID: tabID,
             title: aEvent.target.title
           }
         });
--- a/mobile/components/BrowserCLH.js
+++ b/mobile/components/BrowserCLH.js
@@ -25,17 +25,19 @@ function openWindow(aParent, aURL, aTarg
 
 function BrowserCLH() {}
 
 BrowserCLH.prototype = {
   handle: function fs_handle(aCmdLine) {
     let urlParam = "about:home";
     try {
         urlParam = aCmdLine.handleFlagWithParam("remote", false);
-    } catch (e) { dump("" + e); }
+    } catch (e) {
+      // Optional so not a real error
+    }
     dump("fs_handle: " + urlParam);
     try {
       let urifixup = Cc["@mozilla.org/docshell/urifixup;1"].getService(Ci.nsIURIFixup);
       let uri = urifixup.createFixupURI(urlParam, 1);
       if (!uri)
         return;
 
       let browserWin = Services.wm.getMostRecentWindow("navigator:browser");