Ignore:
Timestamp:
Jun 25, 2006, 10:53:03 AM (19 years ago)
Author:
thatcher
Message:

JavaScriptCore:

Reviewed by Darin.

Bug 9574: Drosera should show inline scripts within the original HTML
http://bugzilla.opendarwin.org/show_bug.cgi?id=9574

Pass the starting line number and error message to the debugger.

  • kjs/debugger.cpp: (Debugger::sourceParsed):
  • kjs/debugger.h:
  • kjs/function.cpp: (KJS::GlobalFuncImp::callAsFunction):
  • kjs/function_object.cpp: (FunctionObjectImp::construct):
  • kjs/interpreter.cpp: (KJS::Interpreter::evaluate):

WebCore:

Reviewed by Darin.

Bug 9574: Drosera should show inline scripts within the original HTML
http://bugzilla.opendarwin.org/show_bug.cgi?id=9574

  • Pass the starting line number and error message to the debugger.
  • Call parsedSource even if there was a script parse error so the debugger can show the parse error.
  • Pass NSURL objects to the ObjC delegate for the script URLs.
  • bridge/mac/WebCoreScriptDebugger.h:
  • bridge/mac/WebCoreScriptDebugger.mm: (toNSURL): (WebCoreScriptDebuggerImp::sourceParsed):

WebKit:

Reviewed by Darin.

Bug 9574: Drosera should show inline scripts within the original HTML
http://bugzilla.opendarwin.org/show_bug.cgi?id=9574

  • Adds a new version of the didParseSource delegate callback with base line number.
  • Adds a new delegate callback for when a script fails to parse.
  • These new callbacks use NSURLs for the url parameter.
  • Adds a new script listener callback to notify when the main resource loads.
  • Adds a WebScriptErrorDomian and other keys for use with NSError.
  • DefaultDelegates/WebDefaultScriptDebugDelegate.m: (-[WebDefaultScriptDebugDelegate webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]): (-[WebDefaultScriptDebugDelegate webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
  • DefaultDelegates/WebScriptDebugServer.h:
  • DefaultDelegates/WebScriptDebugServer.m: (-[WebScriptDebugServer webView:didLoadMainResourceForDataSource:]): (-[WebScriptDebugServer webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]): (-[WebScriptDebugServer webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
  • DefaultDelegates/WebScriptDebugServerPrivate.h:
  • WebKit.exp:
  • WebView/WebDataSource.m: (-[WebDataSource _setPrimaryLoadComplete:]):
  • WebView/WebScriptDebugDelegate.h:
  • WebView/WebScriptDebugDelegate.m: (-[WebScriptCallFrame parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]):

WebKitTools:

Reviewed by Darin.

Bug 9574: Drosera should show inline scripts within the original HTML
http://bugzilla.opendarwin.org/show_bug.cgi?id=9574

Refactor the JavaScript code to have a distinction between files
and scripts. Show the script in the context of the HTML file if
it's URL is the same as the frame's main resource. At the time of
the disParseScript callback the main resource might not be completely
loaded, but Drosera needs to show whatever we have at the time. Once
the main resource is finished, update the file source and reload the file.

  • Drosera/DebuggerDocument.m: (-[DebuggerDocument pause]): (-[DebuggerDocument webView:didLoadMainResourceForDataSource:]): (-[DebuggerDocument webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]): (-[DebuggerDocument webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
  • Drosera/debugger.css:
  • Drosera/debugger.js:
File:
1 edited

Legend:

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

    r14951 r15026  
    442442    // notify debugger that source has been parsed
    443443    if (m_debugger) {
    444         bool cont = m_debugger->sourceParsed(&m_globalExec, sid, sourceURL, UString(code, codeLength), errLine);
     444        bool cont = m_debugger->sourceParsed(&m_globalExec, sid, sourceURL, UString(code, codeLength), startingLineNumber, errLine, errMsg);
    445445        if (!cont)
    446446            return Completion(Break);
Note: See TracChangeset for help on using the changeset viewer.