Bug 1261143 - Hack recursion depth in metastable state for Mac OS. r=khuey

This commit is contained in:
Wei-Cheng Pan 2016-06-20 23:11:00 +02:00
Родитель c46c20b362
Коммит ba7d93dbef
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -1421,6 +1421,13 @@ CycleCollectedJSRuntime::RunInMetastableState(already_AddRefed<nsIRunnable>&& aR
// There must be an event running to get here. // There must be an event running to get here.
#ifndef MOZ_WIDGET_COCOA #ifndef MOZ_WIDGET_COCOA
MOZ_ASSERT(data.mRecursionDepth > mBaseRecursionDepth); MOZ_ASSERT(data.mRecursionDepth > mBaseRecursionDepth);
#else
// XXX bug 1261143
// Recursion depth should be greater than mBaseRecursionDepth,
// or the runnable will stay in the queue forever.
if (data.mRecursionDepth <= mBaseRecursionDepth) {
data.mRecursionDepth = mBaseRecursionDepth + 1;
}
#endif #endif
mMetastableStateEvents.AppendElement(Move(data)); mMetastableStateEvents.AppendElement(Move(data));