Changes a few remaining ASSERT() calls to NS_ASSERT() calls that I had missed

when working on bug 327349.

bug=330489
r=annie.sullivan@gmail.com
sr=ben@mozilla.org
This commit is contained in:
joe%retrovirus.com 2006-03-14 22:58:59 +00:00
parent dc6918ee00
commit c867d63a62
3 changed files with 15 additions and 11 deletions

View File

@ -805,18 +805,20 @@ var ViewMenu = {
*/
_clean: function VM__clean(popup, startID, endID) {
if (endID)
ASSERT(startID, "meaningless to have valid endID and null startID");
NS_ASSERT(startID, "meaningless to have valid endID and null startID");
if (startID) {
var startElement = document.getElementById(startID);
ASSERT(startElement.parentNode == popup, "startElement is not in popup");
ASSERT(startElement,
"startID does not correspond to an existing element");
NS_ASSERT(startElement.parentNode ==
popup, "startElement is not in popup");
NS_ASSERT(startElement,
"startID does not correspond to an existing element");
var endElement = null;
if (endID) {
endElement = document.getElementById(endID);
ASSERT(endElement.parentNode == popup, "endElement is not in popup");
ASSERT(endElement,
"endID does not correspond to an existing element");
NS_ASSERT(endElement.parentNode == popup,
"endElement is not in popup");
NS_ASSERT(endElement,
"endID does not correspond to an existing element");
}
while (startElement.nextSibling != endElement)
popup.removeChild(startElement.nextSibling);
@ -920,7 +922,8 @@ var ViewMenu = {
const PREFIX = "menucol_";
var columnID = element.id.substr(PREFIX.length, element.id.length);
var column = document.getElementById(columnID);
ASSERT(column, "menu item for column that doesn't exist?! id = " + element.id);
NS_ASSERT(column,
"menu item for column that doesn't exist?! id = " + element.id);
var splitter = column.nextSibling;
if (splitter && splitter.localName != "splitter")

View File

@ -481,7 +481,7 @@
var xulNode = this._self.childNodes[i];
if (PlacesController.nodeIsFolder(xulNode.node) &&
!PlacesController.nodeIsReadOnly(xulNode.node)) {
ASSERT(xulNode.getAttribute("type") == "menu");
NS_ASSERT(xulNode.getAttribute("type") == "menu");
// This is a folder. If the mouse is in the left 25% of the
// node, drop to the left of the folder. If it's in the middle
// 50%, drop into the folder. If it's past that, drop to the right.

View File

@ -347,7 +347,7 @@
<body><![CDATA[
var result = this.getResult();
var container = result.root;
ASSERT(container, "null container");
NS_ASSERT(container, "null container");
// When there's no selection, assume the container is the container
// the view is populated from (i.e. the result's folderId).
if (index != -1) {
@ -505,7 +505,8 @@
index = 0;
else if (insertionPoint.index == -1 || insertionPoint.index >= folder.childCount)
index = folder.childCount - 1;
ASSERT(index < folder.childCount, "index out of range: " + index + " > " + folder);
NS_ASSERT(index < folder.childCount,
"index out of range: " + index + " > " + folder);
return index > -1 ? folder.getChild(index) : null;
]]></body>
</method>