Changeset 96708 in webkit for trunk/Source/JavaScriptCore/wtf


Ignore:
Timestamp:
Oct 5, 2011, 8:51:38 AM (14 years ago)
Author:
[email protected]
Message:

REGRESSION (r96595): WTFReportBacktrace listed as the top frame in all assertion backtraces
https://bugs.webkit.org/show_bug.cgi?id=69424

Skip an extra frame in WTFReportBacktrace. As well, I now don't count skipped frames in maxFrames,
so I've updated maxFrames to 31, as with one skipped frame the previous value was effectively
31 reported frames.

Reviewed by Adam Roben.

  • wtf/Assertions.cpp:
  • wtf/Assertions.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/wtf/Assertions.cpp

    r96690 r96708  
    184184        ::GetProcAddress(kernel32, "RtlCaptureStackBackTrace"));
    185185    if (captureStackBackTraceFunc)
    186         *size = captureStackBackTraceFunc(1, *size, stack, 0);
     186        *size = captureStackBackTraceFunc(0, *size, stack, 0);
    187187    else
    188188        *size = 0;
     
    194194void WTFReportBacktrace()
    195195{
    196     static const int maxFrames = 32;
    197     void* samples[maxFrames];
    198     int frames = maxFrames;
     196    static const int framesToShow = 31;
     197    static const int framesToSkip = 2;
     198    void* samples[framesToShow + framesToSkip];
     199    int frames = framesToShow + framesToSkip;
    199200
    200201    WTFGetBacktrace(samples, &frames);
    201202
    202     for (int i = 1; i < frames; ++i) {
     203    for (int i = framesToSkip; i < frames; ++i) {
    203204        const char* mangledName = 0;
    204205        char* cxaDemangled = 0;
Note: See TracChangeset for help on using the changeset viewer.