Bug 454360 - Use Components.results.NS_BINDING_ABORTED instead of hardcoding the value, r=gavin

This commit is contained in:
Phil Ringnalda 2008-09-09 21:33:27 -07:00
parent 60e60f14f4
commit a0c3300d49
4 changed files with 6 additions and 10 deletions

View File

@ -3901,13 +3901,11 @@ var XULBrowserWindow = {
gBrowser.userTypedValue = null;
if (location.spec != "about:blank") {
const kErrorBindingAborted = 0x804B0002;
const kErrorNetTimeout = 0x804B000E;
switch (aStatus) {
case kErrorBindingAborted:
case Components.results.NS_BINDING_ABORTED:
msg = gNavigatorBundle.getString("nv_stopped");
break;
case kErrorNetTimeout:
case Components.results.NS_ERROR_NET_TIMEOUT:
msg = gNavigatorBundle.getString("nv_timeout");
break;
}

View File

@ -64,7 +64,7 @@ const nsIWebNavigationInfo = Components.interfaces.nsIWebNavigationInfo;
const nsIBrowserSearchService = Components.interfaces.nsIBrowserSearchService;
const nsICommandLineValidator = Components.interfaces.nsICommandLineValidator;
const NS_BINDING_ABORTED = 0x804b0002;
const NS_BINDING_ABORTED = Components.results.NS_BINDING_ABORTED;
const NS_ERROR_WONT_HANDLE_CONTENT = 0x805d0001;
const NS_ERROR_ABORT = Components.results.NS_ERROR_ABORT;

View File

@ -80,7 +80,6 @@ const FP_CONTRACTID = "@mozilla.org/feed-processor;1";
const SEC_CONTRACTID = "@mozilla.org/scriptsecuritymanager;1";
const IS_CONTRACTID = "@mozilla.org/widget/idleservice;1";
const SEC_FLAGS = Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL;
const NS_BINDING_ABORTED = 0x804b0002;
// Expire livemarks after 1 hour by default
var gExpiration = 3600000;
@ -217,7 +216,7 @@ LivemarkService.prototype = {
for (var livemark in this._livemarks) {
if (livemark.loadGroup)
livemark.loadGroup.cancel(NS_BINDING_ABORTED);
livemark.loadGroup.cancel(Components.results.NS_BINDING_ABORTED);
}
// kill timer
@ -469,7 +468,7 @@ LivemarkService.prototype = {
this._livemarks.splice(livemarkIndex, 1);
if (livemark.loadGroup)
livemark.loadGroup.cancel(NS_BINDING_ABORTED);
livemark.loadGroup.cancel(Components.results.NS_BINDING_ABORTED);
},
createInstance: function LS_createInstance(aOuter, aIID) {

View File

@ -1448,7 +1448,6 @@ var gDownloadingPage = {
this._downloadProgress.mode = "normal";
var u = gUpdates.update;
const NS_BINDING_ABORTED = 0x804b0002;
switch (status) {
case Components.results.NS_ERROR_UNEXPECTED:
if (u.selectedPatch.state == STATE_DOWNLOAD_FAILED &&
@ -1473,7 +1472,7 @@ var gDownloadingPage = {
return;
}
break;
case NS_BINDING_ABORTED:
case Components.results.NS_BINDING_ABORTED:
LOG("UI:DownloadingPage", "onStopRequest: Pausing Download");
// Return early, do not remove UI listener since the user may resume
// downloading again.