Ignore:
Timestamp:
May 13, 2003, 2:19:57 PM (22 years ago)
Author:
mjs
Message:

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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/internal.cpp

    r4206 r4363  
    456456    if (errMsg)
    457457      *errMsg = "Parse error at line " + UString::from(eline);
    458 #ifndef NDEBUG
    459     fprintf(stderr, "KJS: JavaScript parse error at line %d.\n", eline);
    460 #endif
    461458    delete prog;
    462459    return 0;
Note: See TracChangeset for help on using the changeset viewer.