Ignore:
Timestamp:
Oct 12, 2007, 8:38:55 AM (18 years ago)
Author:
oliver
Message:

Reviewed by Eric.

  • fix assertion failures on quit.
  • kjs/array_object.cpp: (ArrayProtoFunc::callAsFunction): Dynamically alocate function-scope static UStrings to avoid the static destructor getting called later.
  • kjs/lookup.h: Dynamically alocate function-scope static Identifiers to avoid the static destructor getting called later.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/array_object.cpp

    r26475 r26535  
    536536  case Join: {
    537537    static HashSet<JSObject*> visitedElems;
    538     static const UString empty("");
    539     static const UString comma(",");
     538    static const UString* empty = new UString("");
     539    static const UString* comma = new UString(",");
    540540    bool alreadyVisited = !visitedElems.add(thisObj).second;
    541541    if (alreadyVisited)
    542         return jsString(empty);
    543     UString separator = comma;
    544     UString str = empty;
     542        return jsString(*empty);
     543    UString separator = *comma;
     544    UString str = *empty;
    545545
    546546    if (id == Join && !args[0]->isUndefined())
Note: See TracChangeset for help on using the changeset viewer.