Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo.
This commit is contained in:
@@ -39,8 +39,8 @@ InvalidateRegion(nsIWidget* aWidget, const nsIntRegion& aRegion)
|
||||
/*static*/ already_AddRefed<nsIWidget>
|
||||
nsIWidget::CreatePuppetWidget(TabChild* aTabChild)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(!aTabChild || nsIWidget::UsePuppetWidgets(),
|
||||
"PuppetWidgets not allowed in this configuration");
|
||||
MOZ_ASSERT(!aTabChild || nsIWidget::UsePuppetWidgets(),
|
||||
"PuppetWidgets not allowed in this configuration");
|
||||
|
||||
nsCOMPtr<nsIWidget> widget = new PuppetWidget(aTabChild);
|
||||
return widget.forget();
|
||||
@@ -98,7 +98,7 @@ PuppetWidget::Create(nsIWidget *aParent,
|
||||
const nsIntRect &aRect,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(!aNativeParent, "got a non-Puppet native parent");
|
||||
MOZ_ASSERT(!aNativeParent, "got a non-Puppet native parent");
|
||||
|
||||
BaseCreate(nullptr, aRect, aInitData);
|
||||
|
||||
@@ -292,8 +292,8 @@ PuppetWidget::DispatchEvent(WidgetGUIEvent* event, nsEventStatus& aStatus)
|
||||
nsAutoCString("PuppetWidget"), 0);
|
||||
#endif
|
||||
|
||||
NS_ABORT_IF_FALSE(!mChild || mChild->mWindowType == eWindowType_popup,
|
||||
"Unexpected event dispatch!");
|
||||
MOZ_ASSERT(!mChild || mChild->mWindowType == eWindowType_popup,
|
||||
"Unexpected event dispatch!");
|
||||
|
||||
AutoCacheNativeKeyCommands autoCache(this);
|
||||
if (event->mFlags.mIsSynthesizedForTests && !mNativeKeyCommandsValid) {
|
||||
@@ -804,7 +804,7 @@ PuppetWidget::SetCursor(nsCursor aCursor)
|
||||
nsresult
|
||||
PuppetWidget::Paint()
|
||||
{
|
||||
NS_ABORT_IF_FALSE(!mDirtyRegion.IsEmpty(), "paint event logic messed up");
|
||||
MOZ_ASSERT(!mDirtyRegion.IsEmpty(), "paint event logic messed up");
|
||||
|
||||
if (!mAttachedWidgetListener)
|
||||
return NS_OK;
|
||||
@@ -853,9 +853,9 @@ PuppetWidget::Paint()
|
||||
void
|
||||
PuppetWidget::SetChild(PuppetWidget* aChild)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(this != aChild, "can't parent a widget to itself");
|
||||
NS_ABORT_IF_FALSE(!aChild->mChild,
|
||||
"fake widget 'hierarchy' only expected to have one level");
|
||||
MOZ_ASSERT(this != aChild, "can't parent a widget to itself");
|
||||
MOZ_ASSERT(!aChild->mChild,
|
||||
"fake widget 'hierarchy' only expected to have one level");
|
||||
|
||||
mChild = aChild;
|
||||
}
|
||||
@@ -916,7 +916,7 @@ PuppetWidget::GetNativeData(uint32_t aDataType)
|
||||
{
|
||||
switch (aDataType) {
|
||||
case NS_NATIVE_SHAREABLE_WINDOW: {
|
||||
NS_ABORT_IF_FALSE(mTabChild, "Need TabChild to get the nativeWindow from!");
|
||||
MOZ_ASSERT(mTabChild, "Need TabChild to get the nativeWindow from!");
|
||||
mozilla::WindowsHandle nativeData = 0;
|
||||
if (mTabChild) {
|
||||
mTabChild->SendGetWidgetNativeData(&nativeData);
|
||||
|
||||
Reference in New Issue
Block a user