Ignore:
Timestamp:
Apr 21, 2007, 1:09:45 AM (18 years ago)
Author:
bdash
Message:

2007-04-21 Mitz Pettel <[email protected]>

Reviewed by Adam.

  • kjs/array_object.cpp: (ArrayInstance::sort): Free the old storage, not the new one.
File:
1 edited

Legend:

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

    r20974 r20991  
    318318        memcpy(storageCopy, storage, capacity * sizeof(JSValue*));
    319319        mergesort(storageCopy, lengthNotIncludingUndefined, sizeof(JSValue *), compareByStringForQSort);
     320        fastFree(storage);
    320321        storage = storageCopy;
    321         fastFree(storage);
    322322        execForCompareByStringForQSort = oldExec;
    323323        return;
     
    385385        memcpy(storageCopy, storage, capacity * sizeof(JSValue*));
    386386        mergesort(storageCopy, lengthNotIncludingUndefined, sizeof(JSValue *), compareWithCompareFunctionForQSort);
     387        fastFree(storage);
    387388        storage = storageCopy;
    388389        compareWithCompareFunctionArguments = oldArgs;
Note: See TracChangeset for help on using the changeset viewer.