JavaScriptCore:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2003 21:19:57 +0000 (21:19 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2003 21:19:57 +0000 (21:19 +0000)
commit39c3285c4650b017a3c4fbc699644367b14473d9
treea699b644614dec9fa4b191e5f3322b82411c4519
parent89ae6ca99208a3986b9ba43de0492645b17f86be
JavaScriptCore:

        Reviewed by Darin.

- fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
- improved JavaScript error message format

        * kjs/error_object.cpp:
        (ErrorProtoFuncImp::call): Include line number in toString output.
        * kjs/internal.cpp:
        (Parser::parse): Remove redundant fprintf.
        * kjs/interpreter.cpp:
        (Interpreter::evaluate): Log if the flag is on. Include filename in log output.
        (Interpreter::shouldPrintExceptions): Check the global flag.
        (Interpreter::setShouldPrintExceptions): Set the global flag.
        * kjs/interpreter.h:
        * kjs/nodes.cpp:
        (Node::throwError): Add variants that include value and expression or label in format.
        (NewExprNode::evaluate): Improve error message.
        (FunctionCallNode::evaluate): Improve error message.
        (RelationalNode::evaluate): Improve error message.
        (ContinueNode::execute): Improve error message.
        (BreakNode::execute): Improve error message.
        (LabelNode::execute): Improve error message.
        * kjs/nodes.h:

WebCore:

        Reviewed by Darin.

- fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu

        * khtml/ecma/kjs_proxy.cpp:
        (KJSProxyImpl::evaluate): Pass the filename.
        * kwq/WebCoreJavaScript.h:
        * kwq/WebCoreJavaScript.mm:
        (+[WebCoreJavaScript shouldPrintExceptions]): Call through to JavaScriptCore.
        (+[WebCoreJavaScript setShouldPrintExceptions:]): Call through to JavaScriptCore.
        * khtml/ecma/kjs_events.cpp:
        (JSEventListener::handleEvent): Print exception if there is one.
        * khtml/ecma/kjs_window.cpp:
        (ScheduledAction::execute): Print exception in the function case.

WebKit:

        Reviewed by Darin.

- fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu

        * Misc.subproj/WebCoreStatistics.h:
        * Misc.subproj/WebCoreStatistics.m:
        (+[WebCoreStatistics shouldPrintExceptions]): Call through to WebCore.
        (+[WebCoreStatistics setShouldPrintExceptions:]): Call through to WebCore.

WebBrowser:

        Reviewed by Darin.

- fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu

        * Debug/DebugUtilities.m:
        (-[DebugUtilities createDebugMenu]): Include "Log JavaScript Exceptions" item.
        (-[BrowserDocument toggleLogJavaScriptExceptions:]): Call WebKit to do the toggle.
        (-[BrowserDocument validate_toggleLogJavaScriptExceptions:]): Set state properly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@4363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/ChangeLog-2003-10-25
JavaScriptCore/kjs/error_object.cpp
JavaScriptCore/kjs/internal.cpp
JavaScriptCore/kjs/interpreter.cpp
JavaScriptCore/kjs/interpreter.h
JavaScriptCore/kjs/nodes.cpp
JavaScriptCore/kjs/nodes.h
WebCore/ChangeLog-2003-10-25
WebCore/ChangeLog-2005-08-23
WebCore/khtml/ecma/kjs_events.cpp
WebCore/khtml/ecma/kjs_proxy.cpp
WebCore/khtml/ecma/kjs_window.cpp
WebCore/kwq/WebCoreJavaScript.h
WebCore/kwq/WebCoreJavaScript.mm
WebKit/ChangeLog
WebKit/Misc.subproj/WebCoreStatistics.h
WebKit/Misc.subproj/WebCoreStatistics.m