Changeset 16606 in webkit for trunk/JavaScriptCore/kjs/function.h


Ignore:
Timestamp:
Sep 27, 2006, 5:58:52 PM (19 years ago)
Author:
kmccullo
Message:

Reviewed by Adele.

Fixes a GC stack overflow crash.
The change is to move from a linked list implementation of Parameters to a Vector.
The problem with the linked list is that each one creates it's own stack frame when being destroyed and in extreme cases this caused the stack to overflow.

  • kjs/function.cpp: (KJS::Parameter::Parameter): (KJS::FunctionImp::addParameter): (KJS::FunctionImp::parameterString): (KJS::FunctionImp::processParameters): (KJS::FunctionImp::lengthGetter): (KJS::FunctionImp::getParameterName):
  • kjs/function.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/function.h

    r15846 r16606  
    2727#include "internal.h"
    2828#include <wtf/OwnPtr.h>
     29#include <wtf/Vector.h>
    2930
    3031namespace KJS {
     
    9394    virtual void mark();
    9495  protected:
    95     OwnPtr<Parameter> param;
     96    Vector<Parameter> params;
    9697
    9798  private:
Note: See TracChangeset for help on using the changeset viewer.