Changeset 41912 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
Mar 23, 2009, 11:27:22 AM (16 years ago)
Author:
[email protected]
Message:

Provide JavaScript exception information after slow script timeout

Reviewed by Oliver Hunt.

JavaScriptCore:

  • runtime/Completion.cpp: (JSC::evaluate): Set the exception object as the Completion object's value for slow script timeouts. This is used in WebCore when reporting the exception.
  • runtime/ExceptionHelpers.cpp: (JSC::InterruptedExecutionError::toString): Added. Provides a description message for the exception when it is reported.

WebCore:

  • bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluate): Changed to report exceptions for the Interrupted completion type as well.
Location:
trunk/JavaScriptCore/runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Completion.cpp

    r40046 r41912  
    6969    if (exception) {
    7070        if (exception.isObject() && asObject(exception)->isWatchdogException())
    71             return Completion(Interrupted, result);
     71            return Completion(Interrupted, exception);
    7272        return Completion(Throw, exception);
    7373    }
  • trunk/JavaScriptCore/runtime/ExceptionHelpers.cpp

    r40169 r41912  
    4848
    4949    virtual bool isWatchdogException() const { return true; }
     50
     51    virtual UString toString(ExecState*) const { return "JavaScript execution exceeded timeout."; }
    5052};
    5153
Note: See TracChangeset for help on using the changeset viewer.