mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 946817 - Don't assert mPseudoStack on B2G. r=BenWa
This commit is contained in:
parent
07a1bde05b
commit
3f9c471ac7
@ -84,7 +84,7 @@ ThreadStackHelper::GetStack(Stack& aStack)
|
||||
{
|
||||
// Always run PrepareStackBuffer first to clear aStack
|
||||
if (!PrepareStackBuffer(aStack)) {
|
||||
MOZ_ASSERT(false);
|
||||
// Skip and return empty aStack
|
||||
return;
|
||||
}
|
||||
|
||||
@ -149,13 +149,23 @@ ThreadStackHelper::SigAction(int aSignal, siginfo_t* aInfo, void* aContext)
|
||||
|
||||
bool
|
||||
ThreadStackHelper::PrepareStackBuffer(Stack& aStack) {
|
||||
// Return false to skip getting the stack and return an empty stack
|
||||
aStack.clear();
|
||||
#ifdef MOZ_ENABLE_PROFILER_SPS
|
||||
/* Normally, provided the profiler is enabled, it would be an error if we
|
||||
don't have a pseudostack here (the thread probably forgot to call
|
||||
profiler_register_thread). However, on B2G, profiling secondary threads
|
||||
may be disabled despite profiler being enabled. This is by-design and
|
||||
is not an error. */
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
if (!mPseudoStack) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
MOZ_ASSERT(mPseudoStack);
|
||||
mStackBuffer.clear();
|
||||
return mStackBuffer.reserve(mMaxStackSize);
|
||||
MOZ_ALWAYS_TRUE(mStackBuffer.reserve(mMaxStackSize));
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user