Back out Bug 1127201 (part 2) for various problems.

This commit is contained in:
Andrew McCreight
2015-02-06 15:04:32 -08:00
parent 64644acbbe
commit e048a7df33
347 changed files with 3071 additions and 3032 deletions

View File

@@ -516,10 +516,10 @@ PluginModuleChild::DetectNestedEventLoop(gpointer data)
{
PluginModuleChild* pmc = static_cast<PluginModuleChild*>(data);
MOZ_ASSERT(0 != pmc->mNestedLoopTimerId,
"callback after descheduling");
MOZ_ASSERT(pmc->mTopLoopDepth < g_main_depth(),
"not canceled before returning to main event loop!");
NS_ABORT_IF_FALSE(0 != pmc->mNestedLoopTimerId,
"callback after descheduling");
NS_ABORT_IF_FALSE(pmc->mTopLoopDepth < g_main_depth(),
"not canceled before returning to main event loop!");
PLUGIN_LOG_DEBUG(("Detected nested glib event loop"));
@@ -542,8 +542,8 @@ PluginModuleChild::ProcessBrowserEvents(gpointer data)
{
PluginModuleChild* pmc = static_cast<PluginModuleChild*>(data);
MOZ_ASSERT(pmc->mTopLoopDepth < g_main_depth(),
"not canceled before returning to main event loop!");
NS_ABORT_IF_FALSE(pmc->mTopLoopDepth < g_main_depth(),
"not canceled before returning to main event loop!");
pmc->CallProcessSomeEvents();
@@ -553,8 +553,8 @@ PluginModuleChild::ProcessBrowserEvents(gpointer data)
void
PluginModuleChild::EnteredCxxStack()
{
MOZ_ASSERT(0 == mNestedLoopTimerId,
"previous timer not descheduled");
NS_ABORT_IF_FALSE(0 == mNestedLoopTimerId,
"previous timer not descheduled");
mNestedLoopTimerId =
g_timeout_add_full(kNestedLoopDetectorPriority,
@@ -571,8 +571,8 @@ PluginModuleChild::EnteredCxxStack()
void
PluginModuleChild::ExitedCxxStack()
{
MOZ_ASSERT(0 < mNestedLoopTimerId,
"nested loop timeout not scheduled");
NS_ABORT_IF_FALSE(0 < mNestedLoopTimerId,
"nested loop timeout not scheduled");
g_source_remove(mNestedLoopTimerId);
mNestedLoopTimerId = 0;
@@ -582,8 +582,8 @@ PluginModuleChild::ExitedCxxStack()
void
PluginModuleChild::EnteredCxxStack()
{
MOZ_ASSERT(mNestedLoopTimerObject == nullptr,
"previous timer not descheduled");
NS_ABORT_IF_FALSE(mNestedLoopTimerObject == nullptr,
"previous timer not descheduled");
mNestedLoopTimerObject = new NestedLoopTimer(this);
QTimer::singleShot(kNestedLoopDetectorIntervalMs,
mNestedLoopTimerObject, SLOT(timeOut()));
@@ -592,8 +592,8 @@ PluginModuleChild::EnteredCxxStack()
void
PluginModuleChild::ExitedCxxStack()
{
MOZ_ASSERT(mNestedLoopTimerObject != nullptr,
"nested loop timeout not scheduled");
NS_ABORT_IF_FALSE(mNestedLoopTimerObject != nullptr,
"nested loop timeout not scheduled");
delete mNestedLoopTimerObject;
mNestedLoopTimerObject = nullptr;
}
@@ -636,8 +636,8 @@ PluginModuleChild::InitGraphics()
// called. (Toggle references wouldn't detect if the reference count
// might be higher.)
GObjectDisposeFn* dispose = &G_OBJECT_CLASS(gtk_plug_class)->dispose;
MOZ_ASSERT(*dispose != wrap_gtk_plug_dispose,
"InitGraphics called twice");
NS_ABORT_IF_FALSE(*dispose != wrap_gtk_plug_dispose,
"InitGraphics called twice");
real_gtk_plug_dispose = *dispose;
*dispose = wrap_gtk_plug_dispose;
@@ -1088,7 +1088,7 @@ const NPNetscapeFuncs PluginModuleChild::sBrowserFuncs = {
PluginInstanceChild*
InstCast(NPP aNPP)
{
MOZ_ASSERT(!!(aNPP->ndata), "nil instance");
NS_ABORT_IF_FALSE(!!(aNPP->ndata), "nil instance");
return static_cast<PluginInstanceChild*>(aNPP->ndata);
}