Ignore:
Timestamp:
Jul 23, 2006, 11:06:30 PM (19 years ago)
Author:
thatcher
Message:

JavaScriptCore:

Reviewed by Maciej.

Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
http://bugzilla.opendarwin.org/show_bug.cgi?id=9686

JavaScriptCore portion of the fix.

  • JavaScriptCore.exp: Update symbol for change in argument type.
  • kjs/debugger.cpp: (Debugger::detach): Clear map of recent exceptions. (Debugger::hasHandledException): Track the most recent exception thrown by an interpreter. (Debugger::exception): Change exception argument to a JSValue.
  • kjs/debugger.h:
  • kjs/nodes.cpp: (Node::debugExceptionIfNeeded): Notify the debugger of an exception if it hasn't seen it before. (ThrowNode::execute): Notify the debugger that an exception is being thrown.
  • kjs/nodes.h:

2006-07-23 Geoffrey Garen <[email protected]>

Patch by Eric Albert, reviewed by Darin and me.


  • Fixed <rdar://problem/4645931> JavaScriptCore stack-scanning code crashes (Collector::markStackObjectsConservatively)


  • bindings/jni/jni_jsobject.cpp: On 64bit systems, jint is a long, not an int. (JavaJSObject::getSlot): (JavaJSObject::setSlot):
  • kjs/collector.cpp: (KJS::Collector::markCurrentThreadConservatively): Use a pointer instead of an int as 'dummy,' because on LP64 systems, an int is not pointer-aligned, and we want to scan the stack for pointers.
  • JavaScriptCore.xcodeproj/project.pbxproj: After a tense cease-fire, the XCode war has started up again!

WebCore:

Reviewed by maciej.

Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
http://bugzilla.opendarwin.org/show_bug.cgi?id=9686

WebCore portion of the fix.

  • bridge/mac/WebCoreScriptDebugger.h: (-[WebScriptDebugger exceptionRaised:sourceId:line::]): Add delegate method.
  • bridge/mac/WebCoreScriptDebugger.mm: (WebCoreScriptDebuggerImp::exception): Call delegate method when an exception is raised.

WebKit:

Reviewed by Maciej.

Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
http://bugzilla.opendarwin.org/show_bug.cgi?id=9686

WebKit portion of the fix.

  • DefaultDelegates/WebDefaultScriptDebugDelegate.m: (-[WebDefaultScriptDebugDelegate webView:exceptionWasRaised:sourceId:line:forWebFrame:]):
  • DefaultDelegates/WebScriptDebugServer.h:
  • DefaultDelegates/WebScriptDebugServer.m: (-[WebScriptDebugServer webView:exceptionWasRaised:sourceId:line:forWebFrame:]): Notify listeners that an exception has been raised.
  • WebView/WebScriptDebugDelegate.h:
  • WebView/WebScriptDebugDelegate.m: (-[WebScriptCallFrame exceptionRaised:sourceId:line:]): Dispatch through to delegate and WebScriptDebugServer.
File:
1 edited

Legend:

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

    r15026 r15593  
    8181      p = &q->next;
    8282  }
     83
     84  if (interp)
     85    latestExceptions.remove(interp);
     86  else
     87    latestExceptions.clear();
     88}
     89
     90bool Debugger::hasHandledException(ExecState *exec, JSValue *exception)
     91{
     92    if (latestExceptions.get(exec->dynamicInterpreter()).get() == exception)
     93        return true;
     94
     95    latestExceptions.set(exec->dynamicInterpreter(), exception);
     96    return false;
    8397}
    8498
     
    95109
    96110bool Debugger::exception(ExecState */*exec*/, int /*sourceId*/, int /*lineno*/,
    97                          JSObject */*exceptionObj*/)
     111                         JSValue */*exception*/)
    98112{
    99113  return true;
Note: See TracChangeset for help on using the changeset viewer.