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 2608 66b5976f5f6d4056dfb274a92b511c66e635feb7
parent 2607 a1ccd0b9c52e501526832961ee0e1226d20ecf8a
child 2609 a7bffe8d7e5d97352d7ae6c0c269d2050f65eefd
push id2188
push usermfinkle@mozilla.com
push dateThu, 06 Jan 2011 21:43:22 +0000
reviewersmbrubeck
bugs623693
Bug 623693 - Crash Reporter URL annotation does not happen [r=mbrubeck]
chrome/content/browser.js
--- a/chrome/content/browser.js
+++ b/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();