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

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:52:02 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0c55229527d65b8bac1c7107aa0374cf2842b455
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 8 21:33:43 2001 +0000

    Added checks to validate arguments passed in through public API methods.
    Invalid arguments now throw exceptions.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@427 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Misc.subproj/WebKitReallyPrivate.h b/WebKit/Misc.subproj/WebKitReallyPrivate.h
index 0e7d7f0..c4f95ae 100644
--- a/WebKit/Misc.subproj/WebKitReallyPrivate.h
+++ b/WebKit/Misc.subproj/WebKitReallyPrivate.h
@@ -2,4 +2,20 @@
 	Copyright 2001, Apple, Inc. All rights reserved.
 */
 
-#import "_NSMonitor.h"
\ No newline at end of file
+#import "_NSMonitor.h"
+
+#define WEBKIT_ASSERT_VALID_ARG(arg,expr) \
+    do { \
+        if (!(expr)) { \
+            NSString *reason = [NSString stringWithFormat:@"'%s' fails check: '%s'", #arg, #expr]; \
+            [[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo: nil] raise]; \
+        } \
+    } while (0)
+    
+#define WEBKIT_ASSERT_NOT_NIL(arg) \
+    do { \
+        if ((arg) == nil) { \
+            NSString *reason = [NSString stringWithFormat:@"'%s' is nil", #arg]; \
+            [[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo: nil] raise]; \
+        } \
+    } while (0)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list