Changeset 10222 in webkit for trunk/JavaScriptCore/kjs
- Timestamp:
- Aug 16, 2005, 6:00:00 PM (20 years ago)
- Location:
- trunk/JavaScriptCore/kjs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/fast_malloc.cpp
r9009 r10222 225 225 */ 226 226 227 #include "fast_malloc.h" 228 227 229 namespace KJS { 230 231 #ifndef NDEBUG 232 233 // In debugging builds, use the system malloc for its debugging features. 234 235 void *kjs_fast_malloc(size_t n) 236 { 237 return malloc(n); 238 } 239 240 void *kjs_fast_calloc(size_t n_elements, size_t element_size) 241 { 242 return calloc(n_elements, element_size); 243 } 244 245 void kjs_fast_free(void* p) 246 { 247 free(p); 248 } 249 250 void *kjs_fast_realloc(void* p, size_t n) 251 { 252 return realloc(p, n); 253 } 254 255 #else 228 256 229 257 /* … … 5414 5442 #endif /* WIN32 */ 5415 5443 5416 }; /* end of namespace KJS */ 5444 #endif 5445 5446 } /* end of namespace KJS */ 5417 5447 5418 5448 /* ------------------------------------------------------------ -
trunk/JavaScriptCore/kjs/fast_malloc.h
r9009 r10222 1 // -*- c-basic-offset: 2 -*-2 1 /* 3 2 * This file is part of the KDE libraries … … 21 20 */ 22 21 23 24 #ifndef _FAST_MALLOC_H_ 25 #define _FAST_MALLOC_H_ 22 #ifndef KJS_FAST_MALLOC_H 23 #define KJS_FAST_MALLOC_H 26 24 27 25 // This is a copy of dlmalloc, a fast single-threaded malloc implementation. … … 31 29 // executing or GC is taking place). 32 30 33 34 #ifndef NDEBUG 35 36 #define kjs_fast_malloc malloc 37 #define kjs_fast_calloc calloc 38 #define kjs_fast_free free 39 #define kjs_fast_realloc realloc 40 41 #define KJS_FAST_ALLOCATED 42 43 #else 31 #include <stdlib.h> 44 32 45 33 namespace KJS { … … 50 38 void *kjs_fast_realloc(void* p, size_t n); 51 39 52 } ;40 } 53 41 54 42 #define KJS_FAST_ALLOCATED \ … … 56 44 void operator delete(void* p) { KJS::kjs_fast_free(p); } 57 45 58 #endif 59 60 #endif /* _FAST_MALLOC_H_ */ 46 #endif /* KJS_FAST_MALLOC_H */ -
trunk/JavaScriptCore/kjs/nodes.cpp
r10207 r10222 190 190 void Node::setExceptionDetailsIfNeeded(ExecState *exec) 191 191 { 192 if (exec->hadException()) { 193 ObjectImp *exception = static_cast<ObjectImp *>(exec->exception()); 192 ValueImp *exceptionValue = exec->exception(); 193 if (exceptionValue->isObject()) { 194 ObjectImp *exception = static_cast<ObjectImp *>(exceptionValue); 194 195 if (!exception->hasProperty(exec, "line") && !exception->hasProperty(exec, "sourceURL")) { 195 196 exception->put(exec, "line", Number(line));
Note:
See TracChangeset
for help on using the changeset viewer.