[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:01:47 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 6f8cdd6f9cfbc790a2ae5a6f443db3be3fb1e56c
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 15 07:05:52 2003 +0000

            Reviewed by Dave.
    
    	More objc-exception-blocking excitement.
    
            * kwq/KWQKConfigBase.mm:
            (KConfig::readEntry):
            (KConfig::readNumEntry):
            (RefreshPlugins):
            * kwq/KWQKCursor.mm:
            (+[NSCursor _WebCore_cursorWithName:hotSpot:]):
            * kwq/KWQKJavaAppletWidget.mm:
            (KJavaAppletWidget::showApplet):
            * kwq/KWQKLocale.mm:
            (inputElementAltText):
            (resetButtonDefaultLabel):
            (searchableIndexIntroduction):
            (submitButtonDefaultLabel):
            (KLocale::language):
            * kwq/KWQRegion.mm:
            (QRegion::QRegion):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5185 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 00ad4dc..2166f5d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,26 @@
+2003-10-15  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Dave.
+
+	More objc-exception-blocking excitement.
+
+        * kwq/KWQKConfigBase.mm:
+        (KConfig::readEntry):
+        (KConfig::readNumEntry):
+        (RefreshPlugins):
+        * kwq/KWQKCursor.mm:
+        (+[NSCursor _WebCore_cursorWithName:hotSpot:]):
+        * kwq/KWQKJavaAppletWidget.mm:
+        (KJavaAppletWidget::showApplet):
+        * kwq/KWQKLocale.mm:
+        (inputElementAltText):
+        (resetButtonDefaultLabel):
+        (searchableIndexIntroduction):
+        (submitButtonDefaultLabel):
+        (KLocale::language):
+        * kwq/KWQRegion.mm:
+        (QRegion::QRegion):
+
 2003-10-14  David Hyatt  <hyatt at apple.com>
 
 	Fix an obvious little typo with smallCaps inheritance.  Richard reviewed.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 00ad4dc..2166f5d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,26 @@
+2003-10-15  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Dave.
+
+	More objc-exception-blocking excitement.
+
+        * kwq/KWQKConfigBase.mm:
+        (KConfig::readEntry):
+        (KConfig::readNumEntry):
+        (RefreshPlugins):
+        * kwq/KWQKCursor.mm:
+        (+[NSCursor _WebCore_cursorWithName:hotSpot:]):
+        * kwq/KWQKJavaAppletWidget.mm:
+        (KJavaAppletWidget::showApplet):
+        * kwq/KWQKLocale.mm:
+        (inputElementAltText):
+        (resetButtonDefaultLabel):
+        (searchableIndexIntroduction):
+        (submitButtonDefaultLabel):
+        (KLocale::language):
+        * kwq/KWQRegion.mm:
+        (QRegion::QRegion):
+
 2003-10-14  David Hyatt  <hyatt at apple.com>
 
 	Fix an obvious little typo with smallCaps inheritance.  Richard reviewed.
diff --git a/WebCore/kwq/KWQKConfigBase.mm b/WebCore/kwq/KWQKConfigBase.mm
index 3eb4440..30d257a 100644
--- a/WebCore/kwq/KWQKConfigBase.mm
+++ b/WebCore/kwq/KWQKConfigBase.mm
@@ -25,9 +25,10 @@
 
 #import "KWQKConfigBase.h"
 
-#import "KWQLogging.h"
 #import "KWQColor.h"
+#import "KWQExceptions.h"
 #import "KWQKHTMLSettings.h"
+#import "KWQLogging.h"
 #import "KWQStringList.h"
 #import "WebCoreSettings.h"
 #import "WebCoreViewFactory.h"
@@ -69,13 +70,17 @@ void KConfig::writeEntry(const QString &pKey, const QStringList &rValue,
 QString KConfig::readEntry(const char *pKey, const QString& aDefault) const
 {
     if (impl->isPluginInfo) {
+	volatile NSString * volatile result = @"";
+
+	KWQ_BLOCK_NS_EXCEPTIONS;
+
         id <WebCorePluginInfo> plugin = [[[WebCoreViewFactory sharedFactory] pluginsInfo] objectAtIndex:impl->pluginIndex];
         if (strcmp(pKey, "name") == 0) {
-            return QString::fromNSString([plugin name]);
+            result =[plugin name];
         } else if (strcmp(pKey, "file") == 0) {
-            return QString::fromNSString([plugin filename]);
+            result = [plugin filename];
         } else if (strcmp(pKey, "description") == 0) {
-            return QString::fromNSString([plugin pluginDescription]);
+            result = [plugin pluginDescription];
         } else if (strcmp(pKey, "mime") == 0) {
             NSEnumerator *MIMETypeEnumerator = [plugin MIMETypeEnumerator], *extensionEnumerator;
             NSMutableString *MIMEString = [NSMutableString string];
@@ -96,8 +101,12 @@ QString KConfig::readEntry(const char *pKey, const QString& aDefault) const
                 [MIMEString appendFormat:@":%@;", [plugin descriptionForMIMEType:MIME]];
             }
 
-            return QString::fromNSString(MIMEString);
+            result = MIMEString;
         }
+
+	KWQ_UNBLOCK_NS_EXCEPTIONS;
+	
+	return QString::fromNSString((NSString *)result);
     }
     
     ERROR("not yet implemented");
@@ -107,7 +116,12 @@ QString KConfig::readEntry(const char *pKey, const QString& aDefault) const
 int KConfig::readNumEntry(const char *pKey, int nDefault) const
 {
     if (impl->isPluginInfo && strcmp(pKey, "number") == 0) {
-        return [[[WebCoreViewFactory sharedFactory] pluginsInfo] count];
+        volatile int count = 0;
+	KWQ_BLOCK_NS_EXCEPTIONS;
+	count = [[[WebCoreViewFactory sharedFactory] pluginsInfo] count];
+	KWQ_UNBLOCK_NS_EXCEPTIONS;
+	return count;
+
     }
     ERROR("not yet implemented");
     return nDefault;
@@ -145,6 +159,8 @@ QStringList KConfig::readListEntry(const QString &pKey, char sep) const
 
 void RefreshPlugins(bool reload)
 {
+    KWQ_BLOCK_NS_EXCEPTIONS;
     [[WebCoreViewFactory sharedFactory] refreshPlugins:reload];
+    KWQ_UNBLOCK_NS_EXCEPTIONS;
 }
 
diff --git a/WebCore/kwq/KWQKCursor.mm b/WebCore/kwq/KWQKCursor.mm
index 0f02c70..250d15e 100644
--- a/WebCore/kwq/KWQKCursor.mm
+++ b/WebCore/kwq/KWQKCursor.mm
@@ -25,6 +25,11 @@
 
 #import "KWQKCursor.h"
 
+#import "KWQExceptions.h"
+
+// Simple NSDictionary and NSCursor calls shouldn't need protection,
+// but creating a cursor with a bad image might throw...
+
 @interface KWQKCursorBundleDummy : NSObject { }
 @end
 @implementation KWQKCursorBundleDummy
@@ -43,20 +48,22 @@
         nameToCursor = [[NSMutableDictionary alloc] init];
     }
     
-    NSCursor *cursor = [nameToCursor objectForKey:name];
-    if (!cursor) {
-        NSImage *cursorImage = [[NSImage alloc] initWithContentsOfFile:
+    volatile NSCursor * volatile cursor = [nameToCursor objectForKey:name];
+    if (!cursor) { 
+	KWQ_BLOCK_NS_EXCEPTIONS;
+	NSImage *cursorImage = [[NSImage alloc] initWithContentsOfFile:
             [[NSBundle bundleForClass:[KWQKCursorBundleDummy class]]
             pathForResource:name ofType:@"tiff"]];
         if (cursorImage) {
             cursor = [[NSCursor alloc] initWithImage:cursorImage hotSpot:hotSpot];
             [cursorImage release];
-            [nameToCursor setObject:cursor forKey:name];
-            [cursor release];
+            [nameToCursor setObject:(NSCursor *)cursor forKey:name];
+            [(NSCursor *)cursor release];
         }
+	KWQ_UNBLOCK_NS_EXCEPTIONS;
     }
 
-    return cursor;
+    return (NSCursor *)cursor;
 }
 
 @end
diff --git a/WebCore/kwq/KWQKJavaAppletWidget.mm b/WebCore/kwq/KWQKJavaAppletWidget.mm
index 96780cd..d6bce70 100644
--- a/WebCore/kwq/KWQKJavaAppletWidget.mm
+++ b/WebCore/kwq/KWQKJavaAppletWidget.mm
@@ -26,12 +26,15 @@
 #import "KWQKJavaAppletWidget.h"
 
 #import "KHTMLView.h"
+#import "KWQExceptions.h"
+#import "KWQKHTMLPart.h"
 #import "KWQKJavaAppletContext.h"
 #import "KWQKURL.h"
-#import "KWQKHTMLPart.h"
 #import "KWQView.h"
 #import "WebCoreBridge.h"
 
+// No need to block exceptions for the NSDictionary / NSString calls
+
 KJavaAppletWidget::KJavaAppletWidget(KJavaAppletContext *c, QWidget *)
     : _applet(*this)
     , _context(c)
@@ -57,6 +60,7 @@ void KJavaAppletWidget::showApplet()
 {
     // If the view is a KWQView, we haven't replaced it with the Java view yet.
     // Only set the Java view once.
+    KWQ_BLOCK_NS_EXCEPTIONS;
     if ([getView() isKindOfClass:[KWQView class]]) {
         setView([KWQ(_context->part())->bridge()
             viewForJavaAppletWithFrame:NSMakeRect(x(), y(), width(), height())
@@ -65,4 +69,5 @@ void KJavaAppletWidget::showApplet()
         // Add the view to the main view now so the applet starts immediately rather than until the first paint.
         _context->part()->view()->addChild(this, x(), y());
     }
+    KWQ_UNBLOCK_NS_EXCEPTIONS;
 }
diff --git a/WebCore/kwq/KWQKLocale.mm b/WebCore/kwq/KWQKLocale.mm
index 02e60d2..f5f8f8d 100644
--- a/WebCore/kwq/KWQKLocale.mm
+++ b/WebCore/kwq/KWQKLocale.mm
@@ -25,31 +25,61 @@
 
 #import "KWQKLocale.h"
 
+#import "KWQExceptions.h"
 #import "KWQLogging.h"
 #import "KWQString.h"
 #import "WebCoreViewFactory.h"
 
 QString inputElementAltText()
 {
-    return QString::fromNSString([[WebCoreViewFactory sharedFactory] inputElementAltText]);
+    volatile NSString * volatile altText = @"";
+    KWQ_BLOCK_NS_EXCEPTIONS;
+    altText = [[WebCoreViewFactory sharedFactory] inputElementAltText];
+    KWQ_UNBLOCK_NS_EXCEPTIONS;
+
+    return QString::fromNSString((NSString *)altText);
 }
 
 QString resetButtonDefaultLabel()
 {
-    return QString::fromNSString([[WebCoreViewFactory sharedFactory] resetButtonDefaultLabel]);
+    volatile NSString * volatile defaultLabel = @"";
+
+    KWQ_BLOCK_NS_EXCEPTIONS;
+    defaultLabel = [[WebCoreViewFactory sharedFactory] resetButtonDefaultLabel];
+    KWQ_UNBLOCK_NS_EXCEPTIONS;
+
+    return QString::fromNSString((NSString *)defaultLabel);
 }
 
 QString searchableIndexIntroduction()
 {
-    return QString::fromNSString([[WebCoreViewFactory sharedFactory] searchableIndexIntroduction]);
+    volatile NSString * volatile introduction = @"";
+
+    KWQ_BLOCK_NS_EXCEPTIONS;
+    introduction = [[WebCoreViewFactory sharedFactory] searchableIndexIntroduction];
+    KWQ_UNBLOCK_NS_EXCEPTIONS;
+
+    return QString::fromNSString((NSString *)introduction);
 }
 
 QString submitButtonDefaultLabel()
 {
-    return QString::fromNSString([[WebCoreViewFactory sharedFactory] submitButtonDefaultLabel]);
+    volatile NSString * volatile defaultLabel = @"";
+
+    KWQ_BLOCK_NS_EXCEPTIONS;
+    defaultLabel = [[WebCoreViewFactory sharedFactory] submitButtonDefaultLabel];
+    KWQ_UNBLOCK_NS_EXCEPTIONS;
+
+    return QString::fromNSString((NSString *)defaultLabel);
 }
 
 QString KLocale::language()
 {
-    return QString::fromNSString([[WebCoreViewFactory sharedFactory] defaultLanguageCode]);
+    volatile NSString * volatile code = @"";
+
+    KWQ_BLOCK_NS_EXCEPTIONS;
+    code = [[WebCoreViewFactory sharedFactory] defaultLanguageCode];
+    KWQ_UNBLOCK_NS_EXCEPTIONS;
+
+    return QString::fromNSString((NSString *)code);
 }
diff --git a/WebCore/kwq/KWQRegion.mm b/WebCore/kwq/KWQRegion.mm
index 0a49141..e31da9a 100644
--- a/WebCore/kwq/KWQRegion.mm
+++ b/WebCore/kwq/KWQRegion.mm
@@ -25,6 +25,10 @@
 
 #import "KWQRegion.h"
 
+// None of the NSBezierPath calls here can possibly throw an NSException.
+// Some path calls do this when the path is empty, but we always make
+// those when the path is guaranteed non-empty.
+
 QRegion::QRegion(const QRect &rect)
     : path([[NSBezierPath bezierPathWithRect:rect] retain])
 {
@@ -43,6 +47,8 @@ QRegion::QRegion(const QPointArray &arr)
 {
     path = [[NSBezierPath alloc] init];
     [path moveToPoint:arr[0]];
+    // the moveToPoint: guarantees the path is not empty, which means lineToPoint:
+    // can't throw.
     for (uint i = 1; i < arr.count(); ++i) {
         [path lineToPoint:arr[i]];
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list