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/Executable.h

    r47597 r47620  
    202202            , m_codeBlock(0)
    203203            , m_name(name)
     204            , m_numVariables(0)
    204205        {
    205206            m_node = body;
     
    228229        bool usesArguments() const { return body()->usesArguments(); }
    229230        size_t parameterCount() const { return body()->parameterCount(); }
     231        size_t variableCount() const { return m_numVariables; }
    230232        UString paramString() const { return body()->paramString(); }
    231233
     
    249251        CodeBlock* m_codeBlock;
    250252        const Identifier& m_name;
     253        size_t m_numVariables;
    251254
    252255#if ENABLE(JIT)
Note: See TracChangeset for help on using the changeset viewer.