Title: [134393] trunk/Source/WebCore
Revision
134393
Author
[email protected]
Date
2012-11-13 03:21:33 -0800 (Tue, 13 Nov 2012)

Log Message

Memory instrumentation: remove reportMemoryUsage method from ImageObserver
https://bugs.webkit.org/show_bug.cgi?id=102058

Reviewed by Pavel Feldman.

* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::reportMemoryUsage): drive-by fix, no need to report
each element of the vector as generic vector instrumentation will take care of it.
* platform/graphics/Image.cpp: the client is reported as weak pointer to make sure
we don't count its by the pointer to the base class which may differ from the actual
object address.
(WebCore::Image::reportMemoryUsage):
* platform/graphics/ImageObserver.h: removed reportMemoryUsage method from the interface.
(ImageObserver):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (134392 => 134393)


--- trunk/Source/WebCore/ChangeLog	2012-11-13 10:53:50 UTC (rev 134392)
+++ trunk/Source/WebCore/ChangeLog	2012-11-13 11:21:33 UTC (rev 134393)
@@ -1,3 +1,20 @@
+2012-11-13  Yury Semikhatsky  <[email protected]>
+
+        Memory instrumentation: remove reportMemoryUsage method from ImageObserver
+        https://bugs.webkit.org/show_bug.cgi?id=102058
+
+        Reviewed by Pavel Feldman.
+
+        * bindings/v8/V8PerIsolateData.cpp:
+        (WebCore::V8PerIsolateData::reportMemoryUsage): drive-by fix, no need to report
+        each element of the vector as generic vector instrumentation will take care of it.
+        * platform/graphics/Image.cpp: the client is reported as weak pointer to make sure
+        we don't count its by the pointer to the base class which may differ from the actual
+        object address.
+        (WebCore::Image::reportMemoryUsage):
+        * platform/graphics/ImageObserver.h: removed reportMemoryUsage method from the interface.
+        (ImageObserver):
+
 2012-11-13  Eberhard Graether  <[email protected]>
 
         checkbox to toggle FPS counter in the inspector's settings

Modified: trunk/Source/WebCore/bindings/v8/V8PerIsolateData.cpp (134392 => 134393)


--- trunk/Source/WebCore/bindings/v8/V8PerIsolateData.cpp	2012-11-13 10:53:50 UTC (rev 134392)
+++ trunk/Source/WebCore/bindings/v8/V8PerIsolateData.cpp	2012-11-13 11:21:33 UTC (rev 134393)
@@ -108,9 +108,6 @@
     info.addMember(m_stringCache);
     info.addMember(m_domDataList);
 
-    for (size_t i = 0; i < m_domDataList.size(); i++)
-        info.addMember(m_domDataList[i]);
-
     info.addPrivateBuffer(ScriptProfiler::profilerSnapshotsSize(), WebCoreMemoryTypes::InspectorProfilerAgent);
 }
 

Modified: trunk/Source/WebCore/platform/graphics/Image.cpp (134392 => 134393)


--- trunk/Source/WebCore/platform/graphics/Image.cpp	2012-11-13 10:53:50 UTC (rev 134392)
+++ trunk/Source/WebCore/platform/graphics/Image.cpp	2012-11-13 11:21:33 UTC (rev 134393)
@@ -202,7 +202,7 @@
 {
     MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Image);
     info.addMember(m_data);
-    info.addMember(m_imageObserver);
+    info.addWeakPointer(m_imageObserver);
 }
 
 }

Modified: trunk/Source/WebCore/platform/graphics/ImageObserver.h (134392 => 134393)


--- trunk/Source/WebCore/platform/graphics/ImageObserver.h	2012-11-13 10:53:50 UTC (rev 134392)
+++ trunk/Source/WebCore/platform/graphics/ImageObserver.h	2012-11-13 11:21:33 UTC (rev 134393)
@@ -26,8 +26,6 @@
 #ifndef ImageObserver_h
 #define ImageObserver_h
 
-#include <wtf/Forward.h>
-
 namespace WebCore {
 
 class Image;
@@ -46,8 +44,6 @@
     virtual void animationAdvanced(const Image*) = 0;
 
     virtual void changedInRect(const Image*, const IntRect&) = 0;
-
-    virtual void reportMemoryUsage(MemoryObjectInfo*) const = 0;
 };
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to