Ignore:
Timestamp:
Aug 16, 2005, 6:00:00 PM (20 years ago)
Author:
darin
Message:

Reviewed by Geoff.

  • fixed crash in one of the JavaScript tests (introduced by my throwError change)
  • kjs/nodes.cpp: (Node::setExceptionDetailsIfNeeded): Check if the exception is an object before setting the file and line number properties on it. Something to think about in the future -- do we really want to do this on any object that's thrown? How about limiting it to error objects that were created by the JavaScript engine?
  • changed kjs_fast_malloc so we don't have two conflicting versions of the same function
  • kjs/fast_malloc.h: Took out all the ifdefs from this header.
  • kjs/fast_malloc.cpp: Added non-NDEBUG versions of the functions that just call the system malloc, and put the NDEBUG versions in an #else.
File:
1 edited

Legend:

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

    r9009 r10222  
    225225*/
    226226
     227#include "fast_malloc.h"
     228
    227229namespace KJS {
     230
     231#ifndef NDEBUG
     232
     233// In debugging builds, use the system malloc for its debugging features.
     234
     235void *kjs_fast_malloc(size_t n)
     236{
     237    return malloc(n);
     238}
     239
     240void *kjs_fast_calloc(size_t n_elements, size_t element_size)
     241{
     242    return calloc(n_elements, element_size);
     243}
     244
     245void kjs_fast_free(void* p)
     246{
     247    free(p);
     248}
     249
     250void *kjs_fast_realloc(void* p, size_t n)
     251{
     252    return realloc(p, n);
     253}
     254
     255#else
    228256
    229257/*
     
    54145442#endif /* WIN32 */
    54155443
    5416 };  /* end of namespace KJS */
     5444#endif
     5445
     5446}  /* end of namespace KJS */
    54175447
    54185448/* ------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.