Bug 623693 - Crash Reporter URL annotation does not happen [r=mbrubeck]
authorMark Finkle <mfinkle@mozilla.com>
Thu, 06 Jan 2011 16:37:27 -0500
changeset 67222 54c5e6dd4596977b1fc7522374130b55e7851cc4
parent 67221 8da2c6e41eea107fa7fe9428deb46d8c8fa946d5
child 67223 530f1d5d89b09658de722d10ee90c9a3dbfc8fc9
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)
reviewersmbrubeck
bugs623693
Bug 623693 - Crash Reporter URL annotation does not happen [r=mbrubeck]
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -2244,25 +2244,18 @@ ProgressController.prototype = {
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
       if (aStateFlags & Ci.nsIWebProgressListener.STATE_START)
         this._networkStart();
       else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
         this._networkStop();
     }
 
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_DOCUMENT) {
-      if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) {
-#ifdef MOZ_CRASH_REPORTER
-        if (aRequest instanceof Ci.nsIChannel && CrashReporter.enabled)
-          CrashReporter.annotateCrashReport("URL", aRequest.URI.spec);
-#endif
-      }
-      else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) {
+      if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
         this._documentStop();
-      }
     }
   },
 
   /** This method is called to indicate progress changes for the currently loading page. */
   onProgressChange: function onProgressChange(aWebProgress, aRequest, aCurSelf, aMaxSelf, aCurTotal, aMaxTotal) {
     // To use this method, add NOTIFY_PROGRESS to the flags in Tab._createBrowser
   },
 
@@ -2284,16 +2277,20 @@ ProgressController.prototype = {
     if (locationHasChanged) {
       TapHighlightHelper.hide();
 
       this.browser.lastLocation = location;
       this.browser.userTypedValue = "";
       Browser.getNotificationBox(this.browser).removeTransientNotifications();
       this._tab.resetZoomLevel();
 
+#ifdef MOZ_CRASH_REPORTER
+      if (CrashReporter.enabled)
+        CrashReporter.annotateCrashReport("URL", spec);
+#endif
       if (this._tab == Browser.selectedTab) {
         // We're about to have new page content, so scroll the content area
         // to the top so the new paints will draw correctly.
         // (background tabs are delayed scrolled to top in _documentStop)
         Browser.scrollContentToTop({ x: 0 });
       }
       this._tab.useFallbackWidth = false;
       this._tab.updateViewportSize();