Changeset 6768 in webkit for trunk/JavaScriptCore/kjs/object.cpp


Ignore:
Timestamp:
Jun 4, 2004, 11:49:54 AM (21 years ago)
Author:
kdecker
Message:

JavaScriptCore:

Reviewed by Dave.

  • ObjC bindings do not (yet) pass along sourceurl or line numbers
  • we don't have a way as of yet to accomidate line numbers and urls for dynamic javascript
  • changed the wording of an error message
  • the lexer, parser, and interpreter have been made "sourceURL aware"
  • stored the url into Error
  • bindings/NP_jsobject.cpp: (NPN_Evaluate):
  • bindings/jni/jni_jsobject.cpp: (JSObject::eval):
  • bindings/objc/WebScriptObject.mm: (-[WebScriptObject evaluateWebScript:]):
  • kjs/function.cpp: (GlobalFuncImp::call):
  • kjs/function_object.cpp: (FunctionObjectImp::construct):
  • kjs/internal.cpp: (Parser::parse): (InterpreterImp::checkSyntax): (InterpreterImp::evaluate):
  • kjs/internal.h:
  • kjs/interpreter.cpp: (Interpreter::evaluate):
  • kjs/interpreter.h:
  • kjs/lexer.cpp: (Lexer::setCode):
  • kjs/lexer.h: (KJS::Lexer::sourceURL):
  • kjs/nodes.cpp: (Node::Node): (Node::throwError): (FunctionCallNode::evaluate):
  • kjs/nodes.h:
  • kjs/object.cpp: (KJS::Error::create):
  • kjs/object.h:

WebCore:

Reviewed by Dave.

  • kwq/KWQKHTMLPart.mm: addMessagetoConsole places sourceURL in the dictionary
  • khtml/xml/dom_docimpl.cpp: right now, we don't have a way to get a url, so we leave this blank
  • khtml/ecma/kjs_window.cpp: still need to get the real line number and sourceURL
  • khtml/ecma/kjs_proxy.cpp: now passing the sourceURL to addMessageToConsole
  • khtml/ecma/kjs_events.cpp: still need to grab an accurate line number and sourceURL
  • khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): (JSLazyEventListener::handleEvent):
  • khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::evaluate):
  • khtml/ecma/kjs_window.cpp: (Window::isSafeScript): (ScheduledAction::execute):
  • khtml/xml/dom_docimpl.cpp: (DocumentImpl::open):
  • kwq/KWQKHTMLPart.h:
  • kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::addMessageToConsole):

WebBrowser:

Reviewed by Dave.

  • model is now source url aware
  • refined the ui with custom NSCells that now display error messages, line numbers, and source urls
  • increased the row size to 35 pixels to accomimdate for ErrorCells
  • Debug/ErrorCell.h: Added.
  • Debug/ErrorCell.m: Added. (-[ErrorCell setURL:]): (-[ErrorCell setErrorMessasge:]): (-[ErrorCell setLineNumber:]): (-[ErrorCell drawInteriorWithFrame:inView:]):
  • Debug/ErrorConsole.nib:
  • Debug/ErrorConsoleController.m: (-[ErrorConsoleController init]): (-[ErrorConsoleController awakeFromNib]):
  • Debug/ErrorConsoleModel.h:
  • Debug/ErrorConsoleModel.m: (-[ErrorConsoleModel tableView:willDisplayCell:forTableColumn:row:]): (-[ErrorConsoleModel count]): (-[ErrorConsoleModel selectedURL]):
  • WebBrowser.pbproj/project.pbxproj:
File:
1 edited

Legend:

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

    r6717 r6768  
    493493
    494494Object Error::create(ExecState *exec, ErrorType errtype, const char *message,
    495                      int lineno, int sourceId)
     495                     int lineno, int sourceId, const UString *sourceURL)
    496496{
    497497  Object cons;
     
    531531    err.put(exec, "sourceId", Number(sourceId));
    532532
     533   err.put(exec,"sourceURL", String(*sourceURL));
     534 
    533535  return err;
    534536
Note: See TracChangeset for help on using the changeset viewer.