summaryrefslogtreecommitdiff
path: root/browser
diff options
context:
space:
mode:
authorMoonchild <wolfbeast@users.noreply.github.com>2016-10-15 16:23:56 +0200
committerGitHub <noreply@github.com>2016-10-15 16:23:56 +0200
commit79d90180b83ccd6a35764aedf23e52ce17e1bf44 (patch)
tree446f37b8df043876fdb1049d6ced13d0a51813c0 /browser
parentc39cd1146edea388c2c0a4cb137ca5ebce022cf9 (diff)
parentde1a4a9bc0a011e14035241a380161c247aff3a9 (diff)
downloadpalemoon-gre-79d90180b83ccd6a35764aedf23e52ce17e1bf44.tar.gz
Merge pull request #602 from janekptacijarabaci/places_sortBy
Places: Menu "Views" - "Sort" - throws an errors
Diffstat (limited to 'browser')
-rw-r--r--browser/components/places/content/places.js25
1 files changed, 19 insertions, 6 deletions
diff --git a/browser/components/places/content/places.js b/browser/components/places/content/places.js
index def7e8c89..da30d5bf9 100644
--- a/browser/components/places/content/places.js
+++ b/browser/components/places/content/places.js
@@ -95,7 +95,7 @@ var PlacesOrganizer = {
aIID.equals(Components.interfaces.nsISupports))
return this;
- throw Components.results.NS_NOINTERFACE;
+ throw new Components.Exception("", Components.results.NS_NOINTERFACE);
},
handleEvent: function PO_handleEvent(aEvent) {
@@ -880,7 +880,8 @@ var PlacesSearchBox = {
}
break;
default:
- throw "Invalid filterCollection on search";
+ throw new Components.Exception("Invalid filterCollection on search",
+ Components.results.NS_ERROR_INVALID_ARG);
}
PlacesSearchBox.showSearchUI();
@@ -1022,7 +1023,8 @@ var PlacesQueryBuilder = {
this.setScope("bookmarks");
break;
default:
- throw "Invalid search scope button ID";
+ throw new Components.Exception("Invalid search scope button ID",
+ Components.results.NS_ERROR_INVALID_ARG);
break;
}
},
@@ -1071,7 +1073,8 @@ var PlacesQueryBuilder = {
scopeButtonId = "scopeBarDownloads";
break;
default:
- throw "Invalid search scope";
+ throw new Components.Exception("Invalid search scope",
+ Components.results.NS_ERROR_INVALID_ARG);
break;
}
@@ -1171,6 +1174,14 @@ var ViewMenu = {
var columns = content.columns;
for (var i = 0; i < columns.count; ++i) {
var column = columns.getColumnAt(i).element;
+ if (popup.parentNode && (popup.parentNode.id == "viewSort")) {
+ switch (column.id) {
+ case "placesContentParentFolder":
+ continue;
+ case "placesContentParentFolderPath":
+ continue;
+ }
+ }
var menuitem = document.createElement("menuitem");
menuitem.id = "menucol_" + column.id;
menuitem.column = column;
@@ -1336,7 +1347,8 @@ var ViewMenu = {
// Make sure we have a valid column.
if (!colLookupTable.hasOwnProperty(columnId))
- throw("Invalid column");
+ throw new Components.Exception("Invalid column",
+ Components.results.NS_ERROR_INVALID_ARG);
// Use a default sort direction if none has been specified. If aDirection
// is invalid, result.sortingMode will be undefined, which has the effect
@@ -1402,7 +1414,8 @@ let ContentArea = {
function CA_setContentViewForQueryString(aQueryString, aView, aOptions) {
if (!aQueryString ||
typeof aView != "object" && typeof aView != "function")
- throw new Error("Invalid arguments");
+ throw new Components.Exception("Invalid arguments",
+ Components.results.NS_ERROR_INVALID_ARG);
this._specialViews.set(aQueryString, { view: aView,
options: aOptions || new Object() });