Changeset 10222 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp


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/nodes.cpp

    r10207 r10222  
    190190void Node::setExceptionDetailsIfNeeded(ExecState *exec)
    191191{
    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);
    194195        if (!exception->hasProperty(exec, "line") && !exception->hasProperty(exec, "sourceURL")) {
    195196            exception->put(exec, "line", Number(line));
Note: See TracChangeset for help on using the changeset viewer.