[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
sullivan at apple.com
sullivan at apple.com
Wed Dec 22 12:58:53 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit bbfe38993b7556cfe886af364c65f1fee51246a1
Author: sullivan at apple.com <sullivan at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Sep 3 15:29:50 2010 +0000
https://bugs.webkit.org/show_bug.cgi?id=45175
[WebView unmarkAllTextMatches] will crash if the webview is already closed
Reviewed by Dan Bernstein.
Made this and related methods robust against being called when the WebView is closed.
* WebView/WebView.mm:
(-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
Bail out if the WebView is closed.
(-[WebView countMatchesForText:caseSensitive:highlight:limit:markMatches:]):
Ditto.
(-[WebView unmarkAllTextMatches]):
Ditto.
(-[WebView rectsForTextMatches]):
Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 9e3893e..2ab69c1 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-03 John Sullivan <sullivan at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=45175
+ [WebView unmarkAllTextMatches] will crash if the webview is already closed
+
+ Made this and related methods robust against being called when the WebView is closed.
+
+ * WebView/WebView.mm:
+ (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
+ Bail out if the WebView is closed.
+ (-[WebView countMatchesForText:caseSensitive:highlight:limit:markMatches:]):
+ Ditto.
+ (-[WebView unmarkAllTextMatches]):
+ Ditto.
+ (-[WebView rectsForTextMatches]):
+ Ditto.
+
2010-09-03 Hironori Bono <hbono at chromium.org>
Reviewed by Kent Tamura.
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 8b2f0ed..470855b 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -4380,11 +4380,17 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit
{
+ if (_private->closed)
+ return 0;
+
return [self countMatchesForText:string caseSensitive:caseFlag highlight:highlight limit:limit markMatches:YES];
}
- (NSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit markMatches:(BOOL)markMatches
{
+ if (_private->closed)
+ return 0;
+
WebFrame *frame = [self mainFrame];
unsigned matchCount = 0;
do {
@@ -4409,6 +4415,9 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
- (void)unmarkAllTextMatches
{
+ if (_private->closed)
+ return;
+
WebFrame *frame = [self mainFrame];
do {
id <WebDocumentView> view = [[frame frameView] documentView];
@@ -4421,6 +4430,9 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
- (NSArray *)rectsForTextMatches
{
+ if (_private->closed)
+ return [NSArray array];
+
NSMutableArray *result = [NSMutableArray array];
WebFrame *frame = [self mainFrame];
do {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list