[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:21:33 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit e11498c17f132f3074ccc442ca5ed579277823d9
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jun 26 22:03:43 2002 +0000
- fixed 2971532 -- crash with null KHTMLView at gramicci.com
* WebView.subproj/IFHTMLView.mm:
(-[IFHTMLView reapplyStyles]): Handle widget == 0 case.
(-[IFHTMLView layout]): Handle widget == 0 case.
Fixed a crash I have seen many times where a data source tries
to use its parent to locate the controller after its parent is
deallocated.
* WebView.subproj/IFWebDataSourcePrivate.mm:
(-[IFWebDataSourcePrivate dealloc]): Use _parentDataSourceWillBeDeallocated
instead of _setController:nil.
* WebView.subproj/IFWebFramePrivate.h: Add _parentDataSourceWillBeDeallocated.
* WebView.subproj/IFWebFramePrivate.mm:
(-[IFWebFrame _parentDataSourceWillBeDeallocated]): Does both
a _setController:nil, and a _setParent:nil on both data sources.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 6e361a1..763f593 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,24 @@
+2002-06-26 Darin Adler <darin at apple.com>
+
+ - fixed 2971532 -- crash with null KHTMLView at gramicci.com
+
+ * WebView.subproj/IFHTMLView.mm:
+ (-[IFHTMLView reapplyStyles]): Handle widget == 0 case.
+ (-[IFHTMLView layout]): Handle widget == 0 case.
+
+ Fixed a crash I have seen many times where a data source tries
+ to use its parent to locate the controller after its parent is
+ deallocated.
+
+ * WebView.subproj/IFWebDataSourcePrivate.mm:
+ (-[IFWebDataSourcePrivate dealloc]): Use _parentDataSourceWillBeDeallocated
+ instead of _setController:nil.
+
+ * WebView.subproj/IFWebFramePrivate.h: Add _parentDataSourceWillBeDeallocated.
+ * WebView.subproj/IFWebFramePrivate.mm:
+ (-[IFWebFrame _parentDataSourceWillBeDeallocated]): Does both
+ a _setController:nil, and a _setParent:nil on both data sources.
+
2002-06-26 John Sullivan <sullivan at apple.com>
- fixed 2971024 -- wrong item is bookmarked
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 6e361a1..763f593 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,24 @@
+2002-06-26 Darin Adler <darin at apple.com>
+
+ - fixed 2971532 -- crash with null KHTMLView at gramicci.com
+
+ * WebView.subproj/IFHTMLView.mm:
+ (-[IFHTMLView reapplyStyles]): Handle widget == 0 case.
+ (-[IFHTMLView layout]): Handle widget == 0 case.
+
+ Fixed a crash I have seen many times where a data source tries
+ to use its parent to locate the controller after its parent is
+ deallocated.
+
+ * WebView.subproj/IFWebDataSourcePrivate.mm:
+ (-[IFWebDataSourcePrivate dealloc]): Use _parentDataSourceWillBeDeallocated
+ instead of _setController:nil.
+
+ * WebView.subproj/IFWebFramePrivate.h: Add _parentDataSourceWillBeDeallocated.
+ * WebView.subproj/IFWebFramePrivate.mm:
+ (-[IFWebFrame _parentDataSourceWillBeDeallocated]): Does both
+ a _setController:nil, and a _setParent:nil on both data sources.
+
2002-06-26 John Sullivan <sullivan at apple.com>
- fixed 2971024 -- wrong item is bookmarked
diff --git a/WebKit/WebView.subproj/IFHTMLView.mm b/WebKit/WebView.subproj/IFHTMLView.mm
index 16b6ae5..aed46c9 100644
--- a/WebKit/WebView.subproj/IFHTMLView.mm
+++ b/WebKit/WebView.subproj/IFHTMLView.mm
@@ -149,7 +149,7 @@
{
KHTMLView *widget = _private->widget;
- if (widget->part()->xmlDocImpl() &&
+ if (widget && widget->part()->xmlDocImpl() &&
widget->part()->xmlDocImpl()->renderer()){
if (_private->needsToApplyStyles){
#ifdef _KWQ_TIMING
@@ -177,7 +177,7 @@
[[self window] setAcceptsMouseMovedEvents: YES];
[[self window] _setShouldPostEventNotifications: YES];
- if (widget->part()->xmlDocImpl() &&
+ if (widget && widget->part()->xmlDocImpl() &&
widget->part()->xmlDocImpl()->renderer()){
if (_private->needsLayout){
#ifdef _KWQ_TIMING
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
index 00de98f..b222273 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
@@ -51,12 +51,10 @@ static NSMutableDictionary *_repTypes=nil;
// retained while loading, so no need to release here
WEBKIT_ASSERT(!loading);
- int i, count;
- NSArray *childFrames = [frames allValues];
-
- count = [childFrames count];
- for (i = 0; i < count; i++) {
- [(IFWebFrame *)[childFrames objectAtIndex: i] _setController: nil];
+ NSEnumerator *e = [[frames allValues] objectEnumerator];
+ IFWebFrame *frame;
+ while ((frame = [e nextObject])) {
+ [frame _parentDataSourceWillBeDeallocated];
}
[resourceData release];
diff --git a/WebKit/WebView.subproj/IFWebFramePrivate.h b/WebKit/WebView.subproj/IFWebFramePrivate.h
index 3a81b69..4e388d0 100644
--- a/WebKit/WebView.subproj/IFWebFramePrivate.h
+++ b/WebKit/WebView.subproj/IFWebFramePrivate.h
@@ -66,6 +66,7 @@ typedef enum {
@end
@interface IFWebFrame (IFPrivate)
+- (void)_parentDataSourceWillBeDeallocated;
- (void)_setController: (IFWebController *)controller;
- (void)_setRenderFramePart: (khtml::RenderPart *)p;
- (khtml::RenderPart *)_renderFramePart;
diff --git a/WebKit/WebView.subproj/IFWebFramePrivate.mm b/WebKit/WebView.subproj/IFWebFramePrivate.mm
index 3aa4f91..8fec969 100644
--- a/WebKit/WebView.subproj/IFWebFramePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebFramePrivate.mm
@@ -107,6 +107,13 @@ static const char * const stateNames[6] = {
@implementation IFWebFrame (IFPrivate)
+- (void)_parentDataSourceWillBeDeallocated
+{
+ [_private setController:nil];
+ [_private->dataSource _setParent:nil];
+ [_private->provisionalDataSource _setParent:nil];
+}
+
- (void)_setController: (IFWebController *)controller
{
[_private setController: controller];
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 00de98f..b222273 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -51,12 +51,10 @@ static NSMutableDictionary *_repTypes=nil;
// retained while loading, so no need to release here
WEBKIT_ASSERT(!loading);
- int i, count;
- NSArray *childFrames = [frames allValues];
-
- count = [childFrames count];
- for (i = 0; i < count; i++) {
- [(IFWebFrame *)[childFrames objectAtIndex: i] _setController: nil];
+ NSEnumerator *e = [[frames allValues] objectEnumerator];
+ IFWebFrame *frame;
+ while ((frame = [e nextObject])) {
+ [frame _parentDataSourceWillBeDeallocated];
}
[resourceData release];
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index 3a81b69..4e388d0 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -66,6 +66,7 @@ typedef enum {
@end
@interface IFWebFrame (IFPrivate)
+- (void)_parentDataSourceWillBeDeallocated;
- (void)_setController: (IFWebController *)controller;
- (void)_setRenderFramePart: (khtml::RenderPart *)p;
- (khtml::RenderPart *)_renderFramePart;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 3aa4f91..8fec969 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -107,6 +107,13 @@ static const char * const stateNames[6] = {
@implementation IFWebFrame (IFPrivate)
+- (void)_parentDataSourceWillBeDeallocated
+{
+ [_private setController:nil];
+ [_private->dataSource _setParent:nil];
+ [_private->provisionalDataSource _setParent:nil];
+}
+
- (void)_setController: (IFWebController *)controller
{
[_private setController: controller];
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 16b6ae5..aed46c9 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -149,7 +149,7 @@
{
KHTMLView *widget = _private->widget;
- if (widget->part()->xmlDocImpl() &&
+ if (widget && widget->part()->xmlDocImpl() &&
widget->part()->xmlDocImpl()->renderer()){
if (_private->needsToApplyStyles){
#ifdef _KWQ_TIMING
@@ -177,7 +177,7 @@
[[self window] setAcceptsMouseMovedEvents: YES];
[[self window] _setShouldPostEventNotifications: YES];
- if (widget->part()->xmlDocImpl() &&
+ if (widget && widget->part()->xmlDocImpl() &&
widget->part()->xmlDocImpl()->renderer()){
if (_private->needsLayout){
#ifdef _KWQ_TIMING
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list