Ignore:
Timestamp:
Aug 20, 2009, 9:21:01 PM (16 years ago)
Author:
[email protected]
Message:

REGRESSION: fast/profiler/call.html is crashing occasionally
https://bugs.webkit.org/show_bug.cgi?id=28476

Reviewed by Gavin Barraclough.

Using the codeblock for information about how many parameters and
locals a function has is unsafe in certain circumstances. The
basic scenario is all function code being cleared in response to
the debugger or profiler being enabled, and then an activation is
marked before its associated function is re-executed.

To deal with this scenario we store the variable count of a function
directly in the FunctionExecutable, and then use that information.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSActivation.cpp

    r47412 r47620  
    5858        return;
    5959
    60     size_t numParametersMinusThis = d()->functionExecutable->generatedBytecode().m_numParameters - 1;
     60    size_t numParametersMinusThis = d()->functionExecutable->parameterCount();
    6161
    6262    size_t count = numParametersMinusThis;
    6363    markStack.appendValues(registerArray, count);
    6464
    65     size_t numVars = d()->functionExecutable->generatedBytecode().m_numVars;
     65    size_t numVars = d()->functionExecutable->variableCount();
    6666
    6767    // Skip the call frame, which sits between the parameters and vars.
Note: See TracChangeset for help on using the changeset viewer.