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

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:28:23 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 15abd30e504c2d560fbe3e8915b9bb948de696d9
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Mar 3 00:20:30 2004 +0000

    	Removed retain/release from NP_Class.  Classes will not be allowed to implement their
    	own customer retain/release scheme.
    
            Reviewed by Chris.
    
            * bindings/NP_runtime.cpp:
            (NP_RetainObject):
            (NP_ReleaseObject):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6158 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 49e9e57..030c4f2 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,17 @@
 2004-03-02  Richard Williamson   <rjw at apple.com>
 
+	Removed retain/release from NP_Class.  Classes will not be allowed to implement their
+	own customer retain/release scheme.
+
+        Reviewed by Chris.
+
+        * bindings/NP_runtime.cpp:
+        (NP_RetainObject):
+        (NP_ReleaseObject):
+        * bindings/NP_runtime.h:
+
+2004-03-02  Richard Williamson   <rjw at apple.com>
+
 	C binding API.  Partial implementation.
 
 	Completed ObjectiveC bindings (not based on the C API).  These will re-implemented over the C binding API, but I wanted to get this code in the tree.
diff --git a/JavaScriptCore/bindings/npruntime.cpp b/JavaScriptCore/bindings/npruntime.cpp
index d378942..d49ef29 100644
--- a/JavaScriptCore/bindings/npruntime.cpp
+++ b/JavaScriptCore/bindings/npruntime.cpp
@@ -57,9 +57,6 @@ NP_Object *NP_CreateObject (NP_Class *aClass)
 
 NP_Object *NP_RetainObject (NP_Object *obj)
 {
-    if (obj->_class->retain != NULL)
-        return obj->_class->retain (obj);
-
     obj->referenceCount++;
 
     return obj;
@@ -68,19 +65,15 @@ NP_Object *NP_RetainObject (NP_Object *obj)
 
 void NP_ReleaseObject (NP_Object *obj)
 {
-    if (obj->_class->release != NULL)
-        obj->_class->release (obj);
-    else {
-        assert (obj->referenceCount >= 1);
-
-        obj->referenceCount--;
-                
-        if (obj->referenceCount == 0) {
-            if (obj->_class->destroy)
-                obj->_class->destroy (obj);
-            else
-                free (obj);
-        }
+    assert (obj->referenceCount >= 1);
+
+    obj->referenceCount--;
+            
+    if (obj->referenceCount == 0) {
+        if (obj->_class->destroy)
+            obj->_class->destroy (obj);
+        else
+            free (obj);
     }
 }
 
diff --git a/JavaScriptCore/bindings/npruntime.h b/JavaScriptCore/bindings/npruntime.h
index 1501326..216a346 100644
--- a/JavaScriptCore/bindings/npruntime.h
+++ b/JavaScriptCore/bindings/npruntime.h
@@ -127,8 +127,6 @@ struct NP_Class
     int32_t structVersion;
     NP_CreateInterface create;
     NP_DestroyInterface destroy;
-    NP_RetainInterface retain;
-    NP_ReleaseInterface release;
     NP_InvalidateInterface invalidate;
     NP_HasMethodInterface hasMethod;
     NP_InvokeInterface invoke;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list