From b3ed91b38d35874adf20fd2e3c2d4646ae33bc57 Mon Sep 17 00:00:00 2001 From: "flamingice%sourmilk.net" Date: Fri, 13 Jul 2007 17:43:18 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20387995,=20don't=20=5Frepeatedly=5F=20try?= =?UTF-8?q?=20to=20use=20Breakpad=20if=20it=20wasn't=20built,=20Patch=20by?= =?UTF-8?q?=20Simon=20B=EF=BF=BD=EF=BF=BDnzli,=20r=3Dgavin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sessionstore/src/nsSessionStore.js | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/browser/components/sessionstore/src/nsSessionStore.js b/browser/components/sessionstore/src/nsSessionStore.js index a968bd54088..4e18f1b2209 100644 --- a/browser/components/sessionstore/src/nsSessionStore.js +++ b/browser/components/sessionstore/src/nsSessionStore.js @@ -355,8 +355,6 @@ SessionStoreService.prototype = { this.onTabLoad(aEvent.currentTarget.ownerDocument.defaultView, aEvent.currentTarget, aEvent); break; case "input": - this.onTabInput(aEvent.currentTarget.ownerDocument.defaultView, aEvent.currentTarget, aEvent); - break; case "DOMAutoComplete": this.onTabInput(aEvent.currentTarget.ownerDocument.defaultView, aEvent.currentTarget, aEvent); break; @@ -1883,15 +1881,17 @@ SessionStoreService.prototype = { * Annotate a breakpad crash report with the currently selected tab's URL. */ _updateCrashReportURL: function sss_updateCrashReportURL(aWindow) { - var currentUrl = aWindow.getBrowser().currentURI.spec; - try { - var cr = Cc["@mozilla.org/xre/app-info;1"]. - getService(Ci.nsICrashReporter); - cr.annotateCrashReport("URL", currentUrl); - } - catch (ex) { - // if breakpad isn't built, we can't annotate the report - } + if (!Ci.nsICrashReporter) { + // if breakpad isn't built, don't bother next time at all + this._updateCrashReportURL = function(aWindow) {}; + return; + } + try { + var currentUrl = aWindow.getBrowser().currentURI.spec; + var cr = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsICrashReporter); + cr.annotateCrashReport("URL", currentUrl); + } + catch (ex) { debug(ex); } }, /**