Avoid additional work on dealloc by adding early out to
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jan 2005 23:41:00 +0000 (23:41 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jan 2005 23:41:00 +0000 (23:41 +0000)
removeNativeReference().  (This will save time on dealloc
for all ObjC DOM objects.)

        Reviewed by Darin.

        * bindings/runtime_root.cpp:
        (KJS::Bindings::removeNativeReference):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8347 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/bindings/runtime_root.cpp

index eafa257223e4909ecc5e9c9e1a956a54033502c5..242ac2d02bafe16a83109ab721d6cade842fa9f8 100644 (file)
@@ -1,3 +1,14 @@
+2005-01-12  Richard Williamson   <rjw@apple.com>
+
+       Avoid additional work on dealloc by adding early out to
+       removeNativeReference().  (This will save time on dealloc
+       for all ObjC DOM objects.)
+
+        Reviewed by Darin.
+
+        * bindings/runtime_root.cpp:
+        (KJS::Bindings::removeNativeReference):
+
 2005-01-12  Richard Williamson   <rjw@apple.com>
 
        Fixed <rdar://problem/3923356> REGRESSION: Java/JavaScript security checks working incorrectly
index 73a177e3b0ab04e301d64413b13559b28000bcb1..e827c7c32b09611f15ab03b4bd88a2ee2fa4bf4a 100644 (file)
@@ -176,6 +176,9 @@ void KJS::Bindings::addNativeReference (const Bindings::RootObject *root, Object
 
 void KJS::Bindings::removeNativeReference (ObjectImp *imp)
 {
+    if (!imp)
+       return;
+       
     CFMutableDictionaryRef referencesDictionary = findReferenceDictionary (imp);
 
     if (referencesDictionary) {