Bug 836088: move variable 'platformData' closer to where it's used, in TableTicker.cpp, to fix unused variable warning on Mac OS X. r=BenWa

This commit is contained in:
Daniel Holbert 2013-01-29 17:59:12 -08:00
parent bcd8c7f508
commit 74281ba12f

View File

@ -820,11 +820,6 @@ void TableTicker::doBacktrace(ThreadProfile &aProfile, TickSample* aSample)
// Start with the current function.
StackWalkCallback(aSample->pc, aSample->sp, &array);
void *platformData = nullptr;
#ifdef XP_WIN
platformData = aSample->context;
#endif
uint32_t maxFrames = array.size - array.count;
#ifdef XP_MACOSX
pthread_t pt = GetProfiledThread(platform_data());
@ -837,6 +832,11 @@ void TableTicker::doBacktrace(ThreadProfile &aProfile, TickSample* aSample)
maxFrames, &array,
reinterpret_cast<void**>(aSample->fp), stackEnd);
#else
void *platformData = nullptr;
#ifdef XP_WIN
platformData = aSample->context;
#endif // XP_WIN
nsresult rv = NS_StackWalk(StackWalkCallback, /* skipFrames */ 0, maxFrames,
&array, thread, platformData);
#endif