Commit a6df3ece authored by thatcher's avatar thatcher

WebCore:

        Reviewed by Darin.

        <rdar://problem/3694163> -[KWQPageState finalize] is incorrect; design change needed
        <rdar://problem/3694165> -[WebCoreFrameBridge finalize] is incorrect; design change needed

        Added close methods that need to be called before these
        objects can be released. This ensures proper tear-down under GC.

        * WebCore.xcodeproj/project.pbxproj:
        * bridge/mac/WebCoreFrameBridge.h:
        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge dealloc]):
        (-[WebCoreFrameBridge finalize]):
        (-[WebCoreFrameBridge close]):
        * bridge/mac/WebCorePageBridge.h:
        * bridge/mac/WebCorePageBridge.mm:
        (-[WebCorePageBridge setMainFrame:]):
        (-[WebCorePageBridge dealloc]):
        (-[WebCorePageBridge finalize]):
        (-[WebCorePageBridge close]):
        (-[WebCorePageBridge mainFrame]):
        (-[WebCorePageBridge setGroupName:]):
        (-[WebCorePageBridge groupName]):
        * kwq/KWQPageState.h:
        * kwq/KWQPageState.mm:
        (-[KWQPageState dealloc]):
        (-[KWQPageState finalize]):
        (-[KWQPageState close]):

WebKit:

        Reviewed by Darin.

        <rdar://problem/4484405> WebKit leaks, improper tear-down
        <rdar://problem/3694059> -[WebBackForwardList finalize] is incorrect; design change needed
        <rdar://problem/3694103> -[WebFrame finalize] is incorrect; design change needed
        <rdar://problem/3694104> -[WebHTMLView finalize] is incorrect; design change needed

        Adds a close method to WebView, this needs to be called when the 
        WebView is no longer needed. To make this easier for the common cases
        there is now an "auto close" on WebView that listens to the view's
        parent window. If the parent window closes and the WebView has no
        hostWindow then the WebView is automatically closed if autoClose is YES.
        To manage WebView closing yourself call setAutoClose: and pass NO.

        When a WebView closes it will tear-down and not be usable anymore.
        Close will will called on various other internal objects as a part
        of this, to ensure proper tear-down in GC without relying on finalize.

        * History/WebBackForwardList.m:
        (-[WebBackForwardList dealloc]):
        (-[WebBackForwardList finalize]):
        (-[WebBackForwardList _close]):
        * History/WebHistoryItem.m:
        (+[WebHistoryItem _closeObjectsInPendingPageCaches]):
        (+[WebHistoryItem _releaseAllPendingPageCaches]):
        * History/WebHistoryItemPrivate.h:
        * WebCoreSupport/WebFrameBridge.m:
        (-[WebFrameBridge close]):
        (-[WebFrameBridge saveDocumentToPageCache:]):
        (-[WebFrameBridge canGoBackOrForward:]):
        * WebView/WebFrame.m:
        (-[WebFrame _detachFromParent]):
        (-[WebFrame dealloc]):
        (-[WebFrame finalize]):
        * WebView/WebFrameView.m:
        (-[WebFrameView _setWebFrame:]):
        (-[WebFrameView finalize]):
        * WebView/WebHTMLView.m:
        (-[WebHTMLView close]):
        (-[NSArray dealloc]):
        (-[NSArray finalize]):
        * WebView/WebHTMLViewInternal.h:
        * WebView/WebHTMLViewPrivate.h:
        * WebView/WebScriptDebugDelegate.m:
        (-[WebScriptCallFrame _initWithFrame:initWithWebFrame:]):
        (-[WebScriptCallFrame parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]):
        (-[WebScriptCallFrame enteredFrame:sourceId:line:]):
        (-[WebScriptCallFrame hitStatement:sourceId:line:]):
        (-[WebScriptCallFrame leavingFrame:sourceId:line:]):
        * WebView/WebScriptDebugDelegatePrivate.h:
        * WebView/WebView.m:
        (-[WebViewPrivate init]):
        (-[WebView _close]):
        (-[WebView dealloc]):
        (-[WebView finalize]):
        (-[WebView viewWillMoveToWindow:]):
        (-[WebView _windowWillClose:]):
        (-[WebView setPreferencesIdentifier:]):
        (-[WebView mainFrame]):
        (-[WebView setHostWindow:]):
        (-[WebView searchFor:direction:caseSensitive:wrap:]):
        (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
        (-[WebView close]):
        (-[WebView setAutoClose:]):
        (-[WebView autoClose]):
        (-[WebView _frameViewAtWindowPoint:]):
        * WebView/WebViewPrivate.h:

WebKitTools:

        Reviewed by Darin.

        Need to call window close so WebView tears-down completly.

        * DumpRenderTree/DumpRenderTree.m:
        (main): call [window close]



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 763a68d0
2006-06-29 Timothy Hatcher <timothy@apple.com>
Reviewed by Darin.
<rdar://problem/3694163> -[KWQPageState finalize] is incorrect; design change needed
<rdar://problem/3694165> -[WebCoreFrameBridge finalize] is incorrect; design change needed
Added close methods that need to be called before these
objects can be released. This ensures proper tear-down under GC.
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge dealloc]):
(-[WebCoreFrameBridge finalize]):
(-[WebCoreFrameBridge close]):
* bridge/mac/WebCorePageBridge.h:
* bridge/mac/WebCorePageBridge.mm:
(-[WebCorePageBridge setMainFrame:]):
(-[WebCorePageBridge dealloc]):
(-[WebCorePageBridge finalize]):
(-[WebCorePageBridge close]):
(-[WebCorePageBridge mainFrame]):
(-[WebCorePageBridge setGroupName:]):
(-[WebCorePageBridge groupName]):
* kwq/KWQPageState.h:
* kwq/KWQPageState.mm:
(-[KWQPageState dealloc]):
(-[KWQPageState finalize]):
(-[KWQPageState close]):
2006-06-29 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Hyatt.
......
......@@ -183,6 +183,7 @@ typedef enum {
{
WebCoreMacFrame *m_frame;
BOOL _shouldCreateRenderers;
BOOL _closed;
}
+ (WebCoreFrameBridge *)bridgeForDOMDocument:(DOMDocument *)document;
......@@ -190,6 +191,8 @@ typedef enum {
- (id)initMainFrameWithPage:(WebCorePageBridge *)page;
- (id)initSubframeWithRenderer:(WebCoreRenderPart *)renderer;
- (void)close;
+ (NSArray *)supportedNonImageMIMETypes;
+ (NSArray *)supportedImageMIMETypes;
+ (NSArray *)supportedImageResourceMIMETypes; // includes types like PDF
......
......@@ -487,18 +487,23 @@ static inline WebCoreFrameBridge *bridge(Frame *frame)
- (void)dealloc
{
[self removeFromFrame];
ASSERT(_closed);
[super dealloc];
}
- (void)finalize
{
// FIXME: This work really should not be done at deallocation time.
// We need to do it at some well-defined time instead.
[self removeFromFrame];
ASSERT(_closed);
[super finalize];
}
- (void)close
{
[self removeFromFrame];
[self clearFrame];
_closed = YES;
}
- (WebCoreFrameBridge *)parent
{
return bridge(m_frame->tree()->parent());
......
......@@ -48,7 +48,9 @@ class WebCoreFrameBridge;
@interface WebCorePageBridge : NSObject
{
WebCorePage *_page;
BOOL _closed;
}
- (void)close;
- (void)setMainFrame:(WebCoreFrameBridge *)mainFrame;
......
......@@ -76,27 +76,46 @@ static void initializeLoggingChannelsIfNecessary()
- (void)setMainFrame:(WebCoreFrameBridge *)mainFrame
{
_page->setMainFrame(adoptRef([mainFrame impl]));
if (_page)
_page->setMainFrame(adoptRef([mainFrame impl]));
}
- (void)dealloc
{
delete _page;
ASSERT(_closed);
[super dealloc];
}
- (void)finalize
{
ASSERT(_closed);
[super finalize];
}
- (void)close
{
delete _page;
_page = 0;
_closed = YES;
}
- (WebCoreFrameBridge *)mainFrame
{
if (!_page)
return nil;
return Mac(_page->mainFrame())->bridge();
}
- (void)setGroupName:(NSString *)groupName
{
_page->setGroupName(groupName);
if (_page)
_page->setGroupName(groupName);
}
- (NSString *)groupName
{
if (!_page)
return nil;
return _page->groupName();
}
......
......@@ -47,6 +47,7 @@ class KURL;
KJS::SavedProperties *locationProperties;
KJS::SavedBuiltins *interpreterBuiltins;
KJS::PausedTimeouts *pausedTimeouts;
BOOL closed;
}
- initWithDocument:(WebCore::Document *)doc URL:(const KURL &)u windowProperties:(KJS::SavedProperties *)wp locationProperties:(KJS::SavedProperties *)lp interpreterBuiltins:(KJS::SavedBuiltins *)ib pausedTimeouts:(KJS::PausedTimeouts *)pt;
......
......@@ -110,39 +110,20 @@ using namespace KJS;
- (void)dealloc
{
if (document) {
ASSERT(document->view());
ASSERT(document->inPageCache());
FrameView *view = document->view();
FrameMac::clearTimers(view);
bool detached = document->renderer() == 0;
document->setInPageCache(NO);
if (detached) {
document->detach();
document->removeAllEventListenersFromAllNodes();
}
document->deref();
document = 0;
if (view) {
view->clearPart();
view->deref();
}
}
[self clear];
ASSERT(closed);
[super dealloc];
}
- (void)finalize
{
// FIXME: This work really should not be done at deallocation time.
// We need to do it at some well-defined time instead.
ASSERT(closed);
[super finalize];
}
- (void)close
{
if (closed)
return;
if (document) {
ASSERT(document->inPageCache());
ASSERT(document->view());
......@@ -159,7 +140,7 @@ using namespace KJS;
}
document->deref();
document = 0;
if (view) {
view->clearPart();
view->deref();
......@@ -167,8 +148,7 @@ using namespace KJS;
}
[self clear];
[super finalize];
closed = YES;
}
- (Document *)document
......
2006-06-29 Timothy Hatcher <timothy@apple.com>
Reviewed by Darin.
<rdar://problem/4484405> WebKit leaks, improper tear-down
<rdar://problem/3694059> -[WebBackForwardList finalize] is incorrect; design change needed
<rdar://problem/3694103> -[WebFrame finalize] is incorrect; design change needed
<rdar://problem/3694104> -[WebHTMLView finalize] is incorrect; design change needed
Adds a close method to WebView, this needs to be called when the
WebView is no longer needed. To make this easier for the common cases
there is now an "auto close" on WebView that listens to the view's
parent window. If the parent window closes and the WebView has no
hostWindow then the WebView is automatically closed if autoClose is YES.
To manage WebView closing yourself call setAutoClose: and pass NO.
When a WebView closes it will tear-down and not be usable anymore.
Close will will called on various other internal objects as a part
of this, to ensure proper tear-down in GC without relying on finalize.
* History/WebBackForwardList.m:
(-[WebBackForwardList dealloc]):
(-[WebBackForwardList finalize]):
(-[WebBackForwardList _close]):
* History/WebHistoryItem.m:
(+[WebHistoryItem _closeObjectsInPendingPageCaches]):
(+[WebHistoryItem _releaseAllPendingPageCaches]):
* History/WebHistoryItemPrivate.h:
* WebCoreSupport/WebFrameBridge.m:
(-[WebFrameBridge close]):
(-[WebFrameBridge saveDocumentToPageCache:]):
(-[WebFrameBridge canGoBackOrForward:]):
* WebView/WebFrame.m:
(-[WebFrame _detachFromParent]):
(-[WebFrame dealloc]):
(-[WebFrame finalize]):
* WebView/WebFrameView.m:
(-[WebFrameView _setWebFrame:]):
(-[WebFrameView finalize]):
* WebView/WebHTMLView.m:
(-[WebHTMLView close]):
(-[NSArray dealloc]):
(-[NSArray finalize]):
* WebView/WebHTMLViewInternal.h:
* WebView/WebHTMLViewPrivate.h:
* WebView/WebScriptDebugDelegate.m:
(-[WebScriptCallFrame _initWithFrame:initWithWebFrame:]):
(-[WebScriptCallFrame parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]):
(-[WebScriptCallFrame enteredFrame:sourceId:line:]):
(-[WebScriptCallFrame hitStatement:sourceId:line:]):
(-[WebScriptCallFrame leavingFrame:sourceId:line:]):
* WebView/WebScriptDebugDelegatePrivate.h:
* WebView/WebView.m:
(-[WebViewPrivate init]):
(-[WebView _close]):
(-[WebView dealloc]):
(-[WebView finalize]):
(-[WebView viewWillMoveToWindow:]):
(-[WebView _windowWillClose:]):
(-[WebView setPreferencesIdentifier:]):
(-[WebView mainFrame]):
(-[WebView setHostWindow:]):
(-[WebView searchFor:direction:caseSensitive:wrap:]):
(-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
(-[WebView close]):
(-[WebView setAutoClose:]):
(-[WebView autoClose]):
(-[WebView _frameViewAtWindowPoint:]):
* WebView/WebViewPrivate.h:
2006-06-29 Kevin Decker <kdecker@apple.com>
Reviewed by mjs and timo.
......
......@@ -45,6 +45,7 @@ @interface WebBackForwardListPrivate : NSObject
int current;
int maximumSize;
unsigned pageCacheSize;
BOOL closed;
}
@end
......@@ -79,28 +80,26 @@ - (id)init
- (void)dealloc
{
unsigned count = [_private->entries count];
unsigned i;
for (i = 0; i < count; i++){
WebHistoryItem *item = [_private->entries objectAtIndex: i];
[item setHasPageCache: NO];
}
ASSERT(_private->closed);
[_private release];
[super dealloc];
}
- (void)finalize
{
// FIXME: This code is incorrect.
// Instead, change the design so that the list is already empty when released,
// remove the setHasPageCache: code from dealloc, and remove this finalize method.
ASSERT(_private->closed);
[super finalize];
}
- (void)_close
{
unsigned count = [_private->entries count];
unsigned i;
for (i = 0; i < count; i++){
WebHistoryItem *item = [_private->entries objectAtIndex: i];
[item setHasPageCache: NO];
}
[super finalize];
_private->closed = YES;
}
- (void)addItem:(WebHistoryItem *)entry;
......
......@@ -29,6 +29,7 @@
#import <WebKit/WebHistoryItemPrivate.h>
#import <JavaScriptCore/Assertions.h>
#import <WebKit/WebFrameBridge.h>
#import <WebKit/WebFramePrivate.h>
#import <WebKit/WebFrameView.h>
#import <WebKit/WebHTMLViewInternal.h>
......@@ -704,19 +705,23 @@ - (void)_scheduleRelease
}
}
+ (void)_destroyAllPluginsInPendingPageCaches
+ (void)_closeObjectsInPendingPageCaches
{
NSEnumerator *pageCaches = [_pendingPageCacheToRelease objectEnumerator];
NSMutableDictionary *pageCache;
while ((pageCache = [pageCaches nextObject]) != nil) {
while ((pageCache = [pageCaches nextObject])) {
WebHTMLView *HTMLView = [pageCache objectForKey:WebPageCacheDocumentViewKey];
if ([HTMLView isKindOfClass:[WebHTMLView class]]) {
// Don't destroy plug-ins that are currently being viewed.
if ([[[HTMLView _frame] frameView] documentView] != HTMLView) {
[[HTMLView _pluginController] destroyAllPlugins];
}
// To avoid any possible retain cycles, call close on all the WebHTMLView.
// Don't close the WebHTMLVIew that is currently being viewed.
if ([[[HTMLView _frame] frameView] documentView] != HTMLView)
[HTMLView close];
}
id pageState = [pageCache objectForKey:WebCorePageCacheStateKey];
if ([pageState respondsToSelector:@selector(close)])
[pageState performSelector:@selector(close)];
}
}
......@@ -724,10 +729,7 @@ + (void)_releaseAllPendingPageCaches
{
LOG (PageCache, "releasing %d items\n", [_pendingPageCacheToRelease count]);
[WebHistoryItem _invalidateReleaseTimer];
// Plug-ins could retain anything including the WebHTMLView or the window.
// To avoid any possible retain cycle, call destroyPlugin on all the plug-ins
// instead of completely relying on dealloc of WebHTMLView.
[self _destroyAllPluginsInPendingPageCaches];
[self _closeObjectsInPendingPageCaches];
[_pendingPageCacheToRelease removeAllObjects];
}
......
......@@ -97,6 +97,7 @@
@end
@interface WebBackForwardList (WebPrivate)
- (void)_close;
- (BOOL)_usesPageCache;
- (void)_clearPageCache;
@end
......
......@@ -651,6 +651,7 @@ - (void)reportClientRedirectCancelled:(BOOL)cancelWithLoadInProgress
- (void)close
{
[super close];
[_frame release];
_frame = nil;
}
......@@ -796,10 +797,10 @@ - (BOOL)saveDocumentToPageCache:(id)documentInfo
{
WebHistoryItem *item = [_frame _itemForSavingDocState];
if (![item hasPageCache]) {
return false;
return NO;
}
[[item pageCache] setObject:documentInfo forKey:WebCorePageCacheStateKey];
return true;
return YES;
}
- (NSString *)userAgentForURL:(NSURL *)URL
......@@ -1222,15 +1223,15 @@ - (int)historyLength
- (BOOL)canGoBackOrForward:(int)distance
{
if (distance == 0)
return TRUE;
return YES;
if (distance > 0 && distance <= [[[self webView] backForwardList] forwardListCount])
return TRUE;
return YES;
if (distance < 0 && -distance <= [[[self webView] backForwardList] backListCount])
return TRUE;
return YES;
return FALSE;
return NO;
}
- (void)goBackOrForward:(int)distance
......
......@@ -558,7 +558,7 @@ - (void)_closeOldDataSources
- (void)_detachFromParent
{
WebFrameBridge *bridge = _private->bridge;
WebFrameBridge *bridge = [_private->bridge retain];
[bridge closeURL];
[self stopLoading];
......@@ -574,9 +574,12 @@ - (void)_detachFromParent
[self retain]; // retain self temporarily because dealloc can re-enter this method
[bridge close];
[[[self parentFrame] _bridge] removeChild:bridge];
[bridge close];
[bridge release];
bridge = nil;
_private->bridge = nil;
[self release];
......@@ -2849,7 +2852,7 @@ - (id)initWithName:(NSString *)n webFrameView:(WebFrameView *)fv webView:(WebVie
- (void)dealloc
{
[self _detachFromParent];
ASSERT(_private->bridge == nil);
[_private release];
--WebFrameCount;
......@@ -2859,8 +2862,8 @@ - (void)dealloc
- (void)finalize
{
// FIXME: Should not do this work at finalize time. Need to do it at a predictable time instead.
[self _detachFromParent];
ASSERT(_private->bridge == nil);
--WebFrameCount;
[super finalize];
......
......@@ -216,6 +216,12 @@ - (void)_setDocumentView:(NSView <WebDocumentView> *)view
- (void)_setWebFrame:(WebFrame *)webFrame
{
if (!webFrame) {
NSView *docV = [self documentView];
if ([docV respondsToSelector:@selector(close)])
[docV performSelector:@selector(close)];
}
// Not retained because the WebView owns the WebFrame, which owns the WebFrameView.
_private->webFrame = webFrame;
}
......@@ -359,8 +365,6 @@ - (void)finalize
{
--WebFrameViewCount;
_private = nil;
[super finalize];
}
......
......@@ -1832,6 +1832,19 @@ - (void)_writeSelectionToPasteboard:(NSPasteboard *)pasteboard
[mutableTypes release];
}
- (void)close
{
if (_private->closed)
return;
[self _clearLastHitViewIfSelf];
// FIXME: This is slow; should remove individual observers instead.
[[NSNotificationCenter defaultCenter] removeObserver:self];
[_private->pluginController destroyAllPlugins];
// remove tooltips before clearing _private so removeTrackingRect: will work correctly
[self removeAllToolTips];
_private->closed = YES;
}
@end
@implementation NSView (WebHTMLViewFileInternal)
......@@ -1945,12 +1958,10 @@ - (id)initWithFrame:(NSRect)frame
- (void)dealloc
{
[self _clearLastHitViewIfSelf];
// FIXME: This is slow; should remove individual observers instead.
[[NSNotificationCenter defaultCenter] removeObserver:self];
[_private->pluginController destroyAllPlugins];
// remove tooltips before clearing _private so removeTrackingRect: will work correctly
[self removeAllToolTips];
// We can't assert that close has already been called because
// this view can be removed from it's superview, even though
// it could be needed later, so close if needed.
[self close];
[_private release];
_private = nil;
[super dealloc];
......@@ -1958,13 +1969,10 @@ - (void)dealloc
- (void)finalize
{
[self _clearLastHitViewIfSelf];
// FIXME: This is slow; should remove individual observers instead.
[[NSNotificationCenter defaultCenter] removeObserver:self];
[_private->pluginController destroyAllPlugins];
// remove tooltips before clearing _private so removeTrackingRect: will work correctly
[self removeAllToolTips];
_private = nil;
// We can't assert that close has already been called because
// this view can be removed from it's superview, even though
// it could be needed later, so close if needed.
[self close];
[super finalize];
}
......
......@@ -35,6 +35,7 @@
@interface WebHTMLViewPrivate : NSObject
{
@public
BOOL closed;
BOOL needsLayout;
BOOL needsToApplyStyles;
BOOL showsURLsInToolTips;
......
......@@ -48,6 +48,8 @@
+ (NSArray *)supportedNonImageMIMETypes;
+ (NSArray *)unsupportedTextMIMETypes;
- (void)close;
// Modifier (flagsChanged) tracking SPI
+ (void)_postFlagsChangedEvent:(NSEvent *)flagsChangedEvent;
- (void)_updateMouseoverWithFakeEvent;
......
......@@ -53,7 +53,6 @@ @implementation WebScriptDebugger
- (WebScriptDebugger *)initWithWebFrame:(WebFrame *)webFrame
{
if ((self = [super init])) {
_webView = [webFrame webView];
_webFrame = webFrame;
_debugger = [[WebCoreScriptDebugger alloc] initWithDelegate:self];
}
......@@ -78,17 +77,18 @@ - (id)newWrapperForFrame:(WebCoreScriptCallFrame *)frame
- (void)parsedSource:(NSString *)source fromURL:(NSURL *)url sourceId:(int)sid startLine:(int)startLine errorLine:(int)errorLine errorMessage:(NSString *)errorMessage
{
WebView *webView = [_webFrame webView];
if (errorLine == -1) {
[[_webView _scriptDebugDelegateForwarder] webView:_webView didParseSource:source baseLineNumber:startLine fromURL:url sourceId:sid forWebFrame:_webFrame];
[[_webView _scriptDebugDelegateForwarder] webView:_webView didParseSource:source fromURL:[url absoluteString] sourceId:sid forWebFrame:_webFrame]; // deprecated delegate method
[[webView _scriptDebugDelegateForwarder] webView:webView didParseSource:source baseLineNumber:startLine fromURL:url sourceId:sid forWebFrame:_webFrame];
[[webView _scriptDebugDelegateForwarder] webView:webView didParseSource:source fromURL:[url absoluteString] sourceId:sid forWebFrame:_webFrame]; // deprecated delegate method
if ([WebScriptDebugServer listenerCount])
[[WebScriptDebugServer sharedScriptDebugServer] webView:_webView didParseSource:source baseLineNumber:startLine fromURL:url sourceId:sid forWebFrame:_webFrame];
[[WebScriptDebugServer sharedScriptDebugServer] webView:webView didParseSource:source baseLineNumber:startLine fromURL:url sourceId:sid forWebFrame:_webFrame];
} else {
NSDictionary *info = [[NSDictionary alloc] initWithObjectsAndKeys:errorMessage, WebScriptErrorDescriptionKey, [NSNumber numberWithUnsignedInt:errorLine], WebScriptErrorLineNumberKey, nil];
NSError *error = [[NSError alloc] initWithDomain:WebScriptErrorDomain code:WebScriptGeneralErrorCode userInfo:info];
[[_webView _scriptDebugDelegateForwarder] webView:_webView failedToParseSource:source baseLineNumber:startLine fromURL:url withError:error forWebFrame:_webFrame];
[[webView _scriptDebugDelegateForwarder] webView:webView failedToParseSource:source baseLineNumber:startLine fromURL:url withError:error forWebFrame:_webFrame];
if ([WebScriptDebugServer listenerCount])
[[WebScriptDebugServer sharedScriptDebugServer] webView:_webView failedToParseSource:source baseLineNumber:startLine fromURL:url withError:error forWebFrame:_webFrame];
[[WebScriptDebugServer sharedScriptDebugServer] webView:webView failedToParseSource:source baseLineNumber:startLine fromURL:url withError:error forWebFrame:_webFrame];
[error release];
[info release];
}
......@@ -96,23 +96,26 @@ - (void)parsedSource:(NSString *)source fromURL:(NSURL *)url sourceId:(int)sid s
- (void)enteredFrame:(WebCoreScriptCallFrame *)frame sourceId:(int)sid line:(int)lineno
{
[[_webView _scriptDebugDelegateForwarder] webView:_webView didEnterCallFrame:[frame wrapper] sourceId:sid line:lineno forWebFrame:_webFrame];
WebView *webView = [_webFrame webView];
[[webView _scriptDebugDelegateForwarder] webView:webView didEnterCallFrame:[frame wrapper] sourceId:sid line:lineno forWebFrame:_webFrame];
if ([WebScriptDebugServer listenerCount])
[[WebScriptDebugServer sharedScriptDebugServer] webView:_webView didEnterCallFrame:[frame wrapper] sourceId:sid line:lineno forWebFrame:_webFrame];
[[WebScriptDebugServer sharedScriptDebugServer] webView:webView didEnterCallFrame:[frame wrapper] sourceId:sid line:lineno forWebFrame:_webFrame];
}
- (void)hitStatement:(WebCoreScriptCallFrame *)frame sourceId:(int)sid line:(int)lineno
{
[[_webView _scriptDebugDelegateForwarder] webView:_webView willExecuteStatement:[frame wrapper] sourceId:sid line:lineno forWebFrame:_webFrame];
WebView *webView = [_webFrame webView];
[[webView _scriptDebugDelegateForwarder] webView:webView willExecuteStatement:[frame wrapper] sourceId:sid line:lineno forWebFrame:_webFrame];
if ([WebScriptDebugServer listenerCount])
[[WebScriptDebugServer sharedScriptDebugServer] webView:_webView willExecuteStatement:[frame wrapper] sourceId:sid line:lineno forWebFrame:_webFrame];
[[WebScriptDebugServer sharedScriptDebugServer] webView:webView willExecuteStatement:[frame wrapper] sourceId:sid line:lineno forWebFrame:_webFrame];
}
- (void)leavingFrame:(WebCoreScriptCallFrame *)frame sourceId:(int)sid line:(int)lineno
{