Changeset 27001 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp
- Timestamp:
- Oct 24, 2007, 2:31:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.cpp
r26961 r27001 45 45 #define KJS_CHECKEXCEPTION \ 46 46 if (exec->hadException()) \ 47 return rethrowException(exec); \ 48 if (Collector::isOutOfMemory()) \ 49 return createOutOfMemoryCompletion(exec); 47 return rethrowException(exec); 50 48 51 49 #define KJS_CHECKEXCEPTIONVALUE \ … … 53 51 handleException(exec); \ 54 52 return jsUndefined(); \ 55 } \ 56 if (Collector::isOutOfMemory()) \ 57 return jsUndefined(); // will be picked up by KJS_CHECKEXCEPTION 53 } 58 54 59 55 #define KJS_CHECKEXCEPTIONLIST \ … … 61 57 handleException(exec); \ 62 58 return List(); \ 63 } \ 64 if (Collector::isOutOfMemory()) \ 65 return List(); // will be picked up by KJS_CHECKEXCEPTION 66 67 static Completion createOutOfMemoryCompletion(ExecState* exec) 68 { 69 return Completion(Throw, Error::create(exec, GeneralError, "Out of memory")); 70 } 59 } 71 60 72 61 // ------------------------------ Node ----------------------------------------- … … 2563 2552 Completion c = tryBlock->execute(exec); 2564 2553 2554 if (Collector::isOutOfMemory()) 2555 return c; // don't try to catch an out of memory exception thrown by the collector 2556 2565 2557 if (catchBlock && c.complType() == Throw) { 2566 2558 JSObject *obj = new JSObject;
Note:
See TracChangeset
for help on using the changeset viewer.