Bug 611328 - Replace Utils.trace() calls with Utils.assert() [r=ttaubert]

This commit is contained in:
Marco Tulio Costa 2011-08-09 23:34:46 -03:00
parent 1da10d3ace
commit 355bfe447c
2 changed files with 3 additions and 10 deletions

View File

@ -532,10 +532,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
// Possible options:
// force - true to always update the DOM even if the bounds haven't changed; default false
setBounds: function GroupItem_setBounds(inRect, immediately, options) {
if (!Utils.isRect(inRect)) {
Utils.trace('GroupItem.setBounds: rect is not a real rectangle!', inRect);
return;
}
Utils.assert(Utils.isRect(inRect), 'GroupItem.setBounds: rect is not a real rectangle!');
// Validate and conform passed in size
let validSize = GroupItems.calcValidSize(

View File

@ -345,10 +345,7 @@ TabItem.prototype = Utils.extend(new Item(), new Subscribable(), {
// Possible options:
// force - true to always update the DOM even if the bounds haven't changed; default false
setBounds: function TabItem_setBounds(inRect, immediately, options) {
if (!Utils.isRect(inRect)) {
Utils.trace('TabItem.setBounds: rect is not a real rectangle!', inRect);
return;
}
Utils.assert(Utils.isRect(inRect), 'TabItem.setBounds: rect is not a real rectangle!');
if (!options)
options = {};
@ -453,8 +450,7 @@ TabItem.prototype = Utils.extend(new Item(), new Subscribable(), {
rect = this.getBounds(); // ensure that it's a <Rect>
if (!Utils.isRect(this.bounds))
Utils.trace('TabItem.setBounds: this.bounds is not a real rectangle!', this.bounds);
Utils.assert(Utils.isRect(this.bounds), 'TabItem.setBounds: this.bounds is not a real rectangle!');
if (!this.parent && this.tab.parentNode != null)
this.setTrenches(rect);