[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 06:31:07 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 73e1b130150a317500539b445c4aeadf54f11df2
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 14 06:38:00 2002 +0000

    JavaScriptCore:
    
    	Add the ability to determine the classes of live JavaScript
    	objects, to help with leak fixing.
    
            * kjs/collector.h, kjs/collector.cpp:
            (Collector::liveObjectClasses):
    
    WebCore:
    
    	Add the ability to determine the classes of live JavaScript
    	objects, to help with leak fixing.
    
            * kwq/WebCoreJavaScript.h:
            * kwq/WebCoreJavaScript.mm:
            (+[WebCoreJavaScript liveObjectClasses]):
    
    WebKit:
    
    	Add the ability to determine the classes of live JavaScript
    	objects, to help with leak fixing.
    
            * Misc.subproj/WebCoreStatistics.h:
            * Misc.subproj/WebCoreStatistics.m:
            (+[WebCoreStatistics javaScriptLiveObjectClasses]):
    
    WebBrowser:
    
    	Add display of classes of live JavaScript objects to Caches
    	window, to help with leak fixing.
    
            * Debug/CacheController.h:
            * Debug/CacheController.m:
            (-[CacheController refreshJavaScriptStatisticsMatrix]):
            * Debug/CacheController.nib:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1811 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 1371db5..1878742 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,13 @@
 2002-08-13  Maciej Stachowiak  <mjs at apple.com>
 
+	Add the ability to determine the classes of live JavaScript
+	objects, to help with leak fixing.
+
+        * kjs/collector.h, kjs/collector.cpp:
+        (Collector::liveObjectClasses):
+
+2002-08-13  Maciej Stachowiak  <mjs at apple.com>
+
 	Small speed improvement. 3% faster on cvs-js-performance, no
 	measurable change on cvs-static-urls.
 	
diff --git a/JavaScriptCore/ChangeLog-2002-12-03 b/JavaScriptCore/ChangeLog-2002-12-03
index 1371db5..1878742 100644
--- a/JavaScriptCore/ChangeLog-2002-12-03
+++ b/JavaScriptCore/ChangeLog-2002-12-03
@@ -1,5 +1,13 @@
 2002-08-13  Maciej Stachowiak  <mjs at apple.com>
 
+	Add the ability to determine the classes of live JavaScript
+	objects, to help with leak fixing.
+
+        * kjs/collector.h, kjs/collector.cpp:
+        (Collector::liveObjectClasses):
+
+2002-08-13  Maciej Stachowiak  <mjs at apple.com>
+
 	Small speed improvement. 3% faster on cvs-js-performance, no
 	measurable change on cvs-static-urls.
 	
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index 1371db5..1878742 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,5 +1,13 @@
 2002-08-13  Maciej Stachowiak  <mjs at apple.com>
 
+	Add the ability to determine the classes of live JavaScript
+	objects, to help with leak fixing.
+
+        * kjs/collector.h, kjs/collector.cpp:
+        (Collector::liveObjectClasses):
+
+2002-08-13  Maciej Stachowiak  <mjs at apple.com>
+
 	Small speed improvement. 3% faster on cvs-js-performance, no
 	measurable change on cvs-static-urls.
 	
diff --git a/JavaScriptCore/kjs/collector.cpp b/JavaScriptCore/kjs/collector.cpp
index bcb78be..d7da33a 100644
--- a/JavaScriptCore/kjs/collector.cpp
+++ b/JavaScriptCore/kjs/collector.cpp
@@ -20,6 +20,12 @@
  *
  */
 
+#if APPLE_CHANGES
+#define _COLLECTOR
+#include <CoreFoundation/CoreFoundation.h>
+#include <cxxabi.h>
+#endif
+
 #include "collector.h"
 #include "internal.h"
 
@@ -327,4 +333,31 @@ int Collector::numReferencedObjects()
   return count;
 }
 
+CFSetRef Collector::liveObjectClasses()
+{
+  CFMutableSetRef classes = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks);
+
+  CollectorBlock *block = root;
+  while (block) {
+    ValueImp **r = (ValueImp**)block->mem;
+    assert(r);
+    for (int i = 0; i < block->size; i++, r++)
+   {
+      ValueImp *imp = *r;
+      if (imp != NULL) {
+	const char *mangled_name = typeid(*imp).name();
+	int status;
+	char *demangled_name = __cxxabiv1::__cxa_demangle (mangled_name, NULL, NULL, &status);
+
+        CFStringRef className = CFStringCreateWithCString(NULL, demangled_name, kCFStringEncodingASCII);
+	free(demangled_name);
+	CFSetAddValue(classes, className);
+	CFRelease(className);
+      }
+    }
+    block = block->next;
+  }
+  return classes;
+}
+
 #endif
diff --git a/JavaScriptCore/kjs/collector.h b/JavaScriptCore/kjs/collector.h
index d0649e0..37a123f 100644
--- a/JavaScriptCore/kjs/collector.h
+++ b/JavaScriptCore/kjs/collector.h
@@ -48,6 +48,12 @@
 #include "types.h"
 #include "interpreter.h"
 
+#ifdef APPLE_CHANGES
+#if !defined(__OBJC__) && !defined(_COLLECTOR)
+typedef void *CFSetRef;
+#endif
+#endif
+
 namespace KJS {
 
   class CollectorBlock;
@@ -92,6 +98,7 @@ namespace KJS {
     static int numInterpreters();
     static int numGCNotAllowedObjects();
     static int numReferencedObjects();
+    static CFSetRef liveObjectClasses();
 #endif
   private:
     static CollectorBlock* root;
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 1c4eb06..fea3b33 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-08-13  Maciej Stachowiak  <mjs at apple.com>
+
+	Add the ability to determine the classes of live JavaScript
+	objects, to help with leak fixing.
+
+        * kwq/WebCoreJavaScript.h:
+        * kwq/WebCoreJavaScript.mm:
+        (+[WebCoreJavaScript liveObjectClasses]):
+
 2002-08-13  David Hyatt  <hyatt at apple.com>
 
 	An initial implementation of percentage height table cells.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 1c4eb06..fea3b33 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,12 @@
+2002-08-13  Maciej Stachowiak  <mjs at apple.com>
+
+	Add the ability to determine the classes of live JavaScript
+	objects, to help with leak fixing.
+
+        * kwq/WebCoreJavaScript.h:
+        * kwq/WebCoreJavaScript.mm:
+        (+[WebCoreJavaScript liveObjectClasses]):
+
 2002-08-13  David Hyatt  <hyatt at apple.com>
 
 	An initial implementation of percentage height table cells.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 1c4eb06..fea3b33 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,12 @@
+2002-08-13  Maciej Stachowiak  <mjs at apple.com>
+
+	Add the ability to determine the classes of live JavaScript
+	objects, to help with leak fixing.
+
+        * kwq/WebCoreJavaScript.h:
+        * kwq/WebCoreJavaScript.mm:
+        (+[WebCoreJavaScript liveObjectClasses]):
+
 2002-08-13  David Hyatt  <hyatt at apple.com>
 
 	An initial implementation of percentage height table cells.
diff --git a/WebCore/kwq/WebCoreJavaScript.h b/WebCore/kwq/WebCoreJavaScript.h
index 416378f..7379678 100644
--- a/WebCore/kwq/WebCoreJavaScript.h
+++ b/WebCore/kwq/WebCoreJavaScript.h
@@ -34,6 +34,7 @@
 + (int)objectCount;
 + (int)noGCAllowedObjectCount;
 + (int)referencedObjectCount;
++ (NSSet *)liveObjectClasses;
 
 + (void)garbageCollect;
 
diff --git a/WebCore/kwq/WebCoreJavaScript.mm b/WebCore/kwq/WebCoreJavaScript.mm
index 9d509a4..d5c54ac 100644
--- a/WebCore/kwq/WebCoreJavaScript.mm
+++ b/WebCore/kwq/WebCoreJavaScript.mm
@@ -51,6 +51,11 @@ using KJS::Collector;
     return Collector::numReferencedObjects();
 }
 
++ (NSSet *)liveObjectClasses
+{
+    return [(NSSet *)Collector::liveObjectClasses() autorelease];
+}
+
 + (void)garbageCollect
 {
     while (Collector::collect()) { }
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1c16cf2..d46d6bc 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2002-08-13  Maciej Stachowiak  <mjs at apple.com>
+
+	Add the ability to determine the classes of live JavaScript
+	objects, to help with leak fixing.
+
+        * Misc.subproj/WebCoreStatistics.h:
+        * Misc.subproj/WebCoreStatistics.m:
+        (+[WebCoreStatistics javaScriptLiveObjectClasses]):
+
 2002-08-12  Darin Adler  <darin at apple.com>
 
         * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge isReloading]):
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 1c16cf2..d46d6bc 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-08-13  Maciej Stachowiak  <mjs at apple.com>
+
+	Add the ability to determine the classes of live JavaScript
+	objects, to help with leak fixing.
+
+        * Misc.subproj/WebCoreStatistics.h:
+        * Misc.subproj/WebCoreStatistics.m:
+        (+[WebCoreStatistics javaScriptLiveObjectClasses]):
+
 2002-08-12  Darin Adler  <darin at apple.com>
 
         * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge isReloading]):
diff --git a/WebKit/Misc.subproj/WebCoreStatistics.h b/WebKit/Misc.subproj/WebCoreStatistics.h
index f80a17b..136084f 100644
--- a/WebKit/Misc.subproj/WebCoreStatistics.h
+++ b/WebKit/Misc.subproj/WebCoreStatistics.h
@@ -20,6 +20,7 @@
 + (int)javaScriptInterpretersCount;
 + (int)javaScriptNoGCAllowedObjectsCount;
 + (int)javaScriptReferencedObjectsCount;
++ (NSSet *)javaScriptLiveObjectClasses;
 + (void)garbageCollectJavaScriptObjects;
 
 @end
diff --git a/WebKit/Misc.subproj/WebCoreStatistics.m b/WebKit/Misc.subproj/WebCoreStatistics.m
index 4b48ba3..5973dba 100644
--- a/WebKit/Misc.subproj/WebCoreStatistics.m
+++ b/WebKit/Misc.subproj/WebCoreStatistics.m
@@ -48,6 +48,11 @@
     return [WebCoreJavaScript referencedObjectCount];
 }
 
++ (NSSet *)javaScriptLiveObjectClasses
+{
+    return [WebCoreJavaScript liveObjectClasses];
+}
+
 + (void)garbageCollectJavaScriptObjects
 {
     [WebCoreJavaScript garbageCollect];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list