[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:46:47 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 7054161cb17995298abd0758f3d34fba732a3ca8
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jul 10 21:31:25 2003 +0000
Fixed: <rdar://problem/3161102>: Avoid retain cycles by destroying plug-ins in the page cache before dealloc
Fixed: <rdar://problem/3320624>: WebElementImageAltStringKey is not exported :-(
Unspoof freebsd since we now handle gzip'd content.
Reviewed by rjw.
* History.subproj/WebHistoryItem.m:
(+[WebHistoryItem _destroyAllPluginsInPendingPageCaches]): new, destroys all plug-ins
(+[WebHistoryItem _releaseAllPendingPageCaches]): call _destroyAllPluginsInPendingPageCaches
* WebKit.exp: export WebElementImageAltStringKey
* WebView.subproj/WebUserAgentSpoofTable.c: unspoof freebsd
(hash):
(_web_findSpoofTableEntry):
* WebView.subproj/WebUserAgentSpoofTable.gperf: unspoof freebsd
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 2885762..73a6a26 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,20 @@
+2003-07-10 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: <rdar://problem/3161102>: Avoid retain cycles by destroying plug-ins in the page cache before dealloc
+ Fixed: <rdar://problem/3320624>: WebElementImageAltStringKey is not exported :-(
+ Unspoof freebsd since we now handle gzip'd content.
+
+ Reviewed by rjw.
+
+ * History.subproj/WebHistoryItem.m:
+ (+[WebHistoryItem _destroyAllPluginsInPendingPageCaches]): new, destroys all plug-ins
+ (+[WebHistoryItem _releaseAllPendingPageCaches]): call _destroyAllPluginsInPendingPageCaches
+ * WebKit.exp: export WebElementImageAltStringKey
+ * WebView.subproj/WebUserAgentSpoofTable.c: unspoof freebsd
+ (hash):
+ (_web_findSpoofTableEntry):
+ * WebView.subproj/WebUserAgentSpoofTable.gperf: unspoof freebsd
+
2003-07-10 John Sullivan <sullivan at apple.com>
Reviewed by Chris
diff --git a/WebKit/History.subproj/WebHistoryItem.m b/WebKit/History.subproj/WebHistoryItem.m
index f5fe1a4..2d3a8a3 100644
--- a/WebKit/History.subproj/WebHistoryItem.m
+++ b/WebKit/History.subproj/WebHistoryItem.m
@@ -6,9 +6,11 @@
#import <WebKit/WebHistoryItemPrivate.h>
#import <WebKit/WebFramePrivate.h>
+#import <WebKit/WebHTMLViewPrivate.h>
#import <WebKit/WebIconDatabase.h>
#import <WebKit/WebIconLoader.h>
#import <WebKit/WebKitLogging.h>
+#import <WebKit/WebPluginController.h>
#import <WebKit/WebAssertions.h>
#import <Foundation/NSDictionary_NSURLExtras.h>
@@ -613,10 +615,27 @@ static NSTimer *_pageCacheReleaseTimer = nil;
}
}
++ (void)_destroyAllPluginsInPendingPageCaches
+{
+ NSEnumerator *pageCaches = [_pendingPageCacheToRelease objectEnumerator];
+ NSMutableDictionary *pageCache;
+
+ while ((pageCache = [pageCaches nextObject]) != nil) {
+ WebHTMLView *HTMLView = [pageCache objectForKey:WebPageCacheDocumentViewKey];
+ if ([HTMLView isKindOfClass:[WebHTMLView class]]) {
+ [[HTMLView _pluginController] destroyAllPlugins];
+ }
+ }
+}
+
+ (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];
[_pendingPageCacheToRelease removeAllObjects];
}
diff --git a/WebKit/WebKit.exp b/WebKit/WebKit.exp
index 0479724..918f824 100644
--- a/WebKit/WebKit.exp
+++ b/WebKit/WebKit.exp
@@ -32,6 +32,7 @@ _WebActionNavigationTypeKey
_WebActionNavigationTypeKey
_WebActionOriginalURLKey
_WebElementFrameKey
+_WebElementImageAltStringKey
_WebElementImageKey
_WebElementImageRectKey
_WebElementImageURLKey
diff --git a/WebKit/WebView.subproj/WebUserAgentSpoofTable.c b/WebKit/WebView.subproj/WebUserAgentSpoofTable.c
index f568537..0693f4e 100644
--- a/WebKit/WebView.subproj/WebUserAgentSpoofTable.c
+++ b/WebKit/WebView.subproj/WebUserAgentSpoofTable.c
@@ -1,7 +1,7 @@
/* ANSI-C code produced by gperf version 2.7.2 */
/* Command-line: gperf -CEot -L ANSI-C -k '*' -N _web_findSpoofTableEntry -F ,0 WebView.subproj/WebUserAgentSpoofTable.gperf */
struct UserAgentSpoofTableEntry { const char *name; UserAgentStringType type; };
-/* maximum key range = 2, duplicates = 0 */
+/* maximum key range = 1, duplicates = 0 */
#ifdef __GNUC__
__inline
@@ -15,40 +15,38 @@ hash (register const char *str, register unsigned int len)
{
static const unsigned char asso_values[] =
{
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 0, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 0, 0, 0,
- 0, 0, 0, 0, 12, 12, 0, 12, 12, 0,
- 12, 0, 12, 12, 0, 0, 12, 0, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 0, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 0, 11, 0,
+ 11, 11, 11, 0, 11, 11, 0, 11, 11, 0,
+ 11, 0, 11, 11, 0, 11, 11, 0, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11
};
register int hval = len;
switch (hval)
{
default:
- case 11:
- hval += asso_values[(unsigned char)str[10]];
case 10:
hval += asso_values[(unsigned char)str[9]];
case 9:
@@ -82,19 +80,18 @@ _web_findSpoofTableEntry (register const char *str, register unsigned int len)
{
enum
{
- TOTAL_KEYWORDS = 2,
+ TOTAL_KEYWORDS = 1,
MIN_WORD_LENGTH = 10,
- MAX_WORD_LENGTH = 11,
+ MAX_WORD_LENGTH = 10,
MIN_HASH_VALUE = 10,
- MAX_HASH_VALUE = 11
+ MAX_HASH_VALUE = 10
};
static const struct UserAgentSpoofTableEntry wordlist[] =
{
{"",0}, {"",0}, {"",0}, {"",0}, {"",0}, {"",0}, {"",0},
{"",0}, {"",0}, {"",0},
- {"jaguar.com", MacIE},
- {"freebsd.org", MacIE}
+ {"jaguar.com", MacIE}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
diff --git a/WebKit/WebView.subproj/WebUserAgentSpoofTable.gperf b/WebKit/WebView.subproj/WebUserAgentSpoofTable.gperf
index 17b9621..128cf32 100644
--- a/WebKit/WebView.subproj/WebUserAgentSpoofTable.gperf
+++ b/WebKit/WebView.subproj/WebUserAgentSpoofTable.gperf
@@ -5,5 +5,3 @@ struct UserAgentSpoofTableEntry { const char *name; UserAgentStringType type; };
#
# pretend to be Mac IE because these sites forbid unknown browsers
jaguar.com, MacIE
-# pretend to be Mac IE to avoid gzipped HTML which we don't support yet
-freebsd.org, MacIE
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list