Title: [128701] trunk/Source
Revision
128701
Author
[email protected]
Date
2012-09-15 21:34:58 -0700 (Sat, 15 Sep 2012)

Log Message

Fix the build with WTF URL
https://bugs.webkit.org/show_bug.cgi?id=96875

Reviewed by Adam Barth.

Source/WebCore: 

Fix reportMemoryUsage, the implementation was only partial.

* WebCore.exp.in: Export two more symbols as needed by API tests.
* platform/KURLWTFURL.cpp:
(WebCore::KURL::string): emptyString() return a reference,
it makes more sense than nullAtom() here.
* platform/KURLWTFURLImpl.h:
(WebCore::KURLWTFURLImpl::reportMemoryUsage):

Source/WTF: 

Add support for MemoryInstrumentation to WTF's URL classes.

* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::reportMemoryUsage):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
* wtf/url/api/URLString.cpp:
(WTF::URLString::reportMemoryUsage):
* wtf/url/api/URLString.h:
(URLString):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (128700 => 128701)


--- trunk/Source/WTF/ChangeLog	2012-09-16 04:24:24 UTC (rev 128700)
+++ trunk/Source/WTF/ChangeLog	2012-09-16 04:34:58 UTC (rev 128701)
@@ -1,3 +1,21 @@
+2012-09-15  Benjamin Poulain  <[email protected]>
+
+        Fix the build with WTF URL
+        https://bugs.webkit.org/show_bug.cgi?id=96875
+
+        Reviewed by Adam Barth.
+
+        Add support for MemoryInstrumentation to WTF's URL classes.
+
+        * wtf/url/api/ParsedURL.cpp:
+        (WTF::ParsedURL::reportMemoryUsage):
+        * wtf/url/api/ParsedURL.h:
+        (ParsedURL):
+        * wtf/url/api/URLString.cpp:
+        (WTF::URLString::reportMemoryUsage):
+        * wtf/url/api/URLString.h:
+        (URLString):
+
 2012-09-15  Raphael Kubo da Costa  <[email protected]>
 
         llint: Implement LOCAL_LABEL_STRING for the BSD platforms.

Modified: trunk/Source/WTF/wtf/url/api/ParsedURL.cpp (128700 => 128701)


--- trunk/Source/WTF/wtf/url/api/ParsedURL.cpp	2012-09-16 04:24:24 UTC (rev 128700)
+++ trunk/Source/WTF/wtf/url/api/ParsedURL.cpp	2012-09-16 04:34:58 UTC (rev 128701)
@@ -30,6 +30,7 @@
 #if USE(WTFURL)
 
 #include <wtf/DataLog.h>
+#include <wtf/MemoryInstrumentation.h>
 #include <wtf/RawURLBuffer.h>
 #include <wtf/URLComponent.h>
 #include <wtf/URLParser.h>
@@ -174,6 +175,12 @@
     return segment;
 }
 
+void ParsedURL::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+{
+    MemoryClassInfo info(memoryObjectInfo, this);
+    info.addInstrumentedMember(m_spec);
+}
+
 #ifndef NDEBUG
 
 #define SHOW_COMPONENT(parsedURL, componentName) \

Modified: trunk/Source/WTF/wtf/url/api/ParsedURL.h (128700 => 128701)


--- trunk/Source/WTF/wtf/url/api/ParsedURL.h	2012-09-16 04:24:24 UTC (rev 128700)
+++ trunk/Source/WTF/wtf/url/api/ParsedURL.h	2012-09-16 04:34:58 UTC (rev 128701)
@@ -64,6 +64,8 @@
 
     const URLString& spec() { return m_spec; }
 
+    WTF_EXPORT_PRIVATE void reportMemoryUsage(MemoryObjectInfo*) const;
+
 #ifndef NDEBUG
     WTF_EXPORT_PRIVATE void print() const;
 #endif

Modified: trunk/Source/WTF/wtf/url/api/URLString.cpp (128700 => 128701)


--- trunk/Source/WTF/wtf/url/api/URLString.cpp	2012-09-16 04:24:24 UTC (rev 128700)
+++ trunk/Source/WTF/wtf/url/api/URLString.cpp	2012-09-16 04:34:58 UTC (rev 128701)
@@ -26,10 +26,18 @@
 #include "config.h"
 #include "URLString.h"
 
+#include <wtf/MemoryInstrumentation.h>
+
 #if USE(WTFURL)
 
 namespace WTF {
 
+void URLString::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+{
+    MemoryClassInfo info(memoryObjectInfo, this);
+    info.addInstrumentedMember(m_string);
+}
+
 #ifndef NDEBUG
 void URLString::print() const
 {

Modified: trunk/Source/WTF/wtf/url/api/URLString.h (128700 => 128701)


--- trunk/Source/WTF/wtf/url/api/URLString.h	2012-09-16 04:24:24 UTC (rev 128700)
+++ trunk/Source/WTF/wtf/url/api/URLString.h	2012-09-16 04:34:58 UTC (rev 128701)
@@ -40,6 +40,8 @@
 
     const String& string() const { return m_string;}
 
+    void reportMemoryUsage(MemoryObjectInfo*) const;
+
 #ifndef NDEBUG
     WTF_EXPORT_PRIVATE void print() const;
 #endif

Modified: trunk/Source/WebCore/ChangeLog (128700 => 128701)


--- trunk/Source/WebCore/ChangeLog	2012-09-16 04:24:24 UTC (rev 128700)
+++ trunk/Source/WebCore/ChangeLog	2012-09-16 04:34:58 UTC (rev 128701)
@@ -1,3 +1,19 @@
+2012-09-15  Benjamin Poulain  <[email protected]>
+
+        Fix the build with WTF URL
+        https://bugs.webkit.org/show_bug.cgi?id=96875
+
+        Reviewed by Adam Barth.
+
+        Fix reportMemoryUsage, the implementation was only partial.
+
+        * WebCore.exp.in: Export two more symbols as needed by API tests.
+        * platform/KURLWTFURL.cpp:
+        (WebCore::KURL::string): emptyString() return a reference,
+        it makes more sense than nullAtom() here.
+        * platform/KURLWTFURLImpl.h:
+        (WebCore::KURLWTFURLImpl::reportMemoryUsage):
+
 2012-09-11  Dirk Schulze  <[email protected]>
 
         Add ClipPathOperation for -webkit-clip-path organization

Modified: trunk/Source/WebCore/WebCore.exp.in (128700 => 128701)


--- trunk/Source/WebCore/WebCore.exp.in	2012-09-16 04:24:24 UTC (rev 128700)
+++ trunk/Source/WebCore/WebCore.exp.in	2012-09-16 04:34:58 UTC (rev 128701)
@@ -2565,7 +2565,9 @@
 
 #if USE(WTFURL)
 __ZNK7WebCore4KURL6stringEv
+__ZNK7WebCore4KURL7hasPortEv
 __ZNK7WebCore4KURL7isEmptyEv
+__ZNK7WebCore4KURL6isNullEv
 __ZNK7WebCore4KURL7isValidEv
 __ZNK7WebCore4KURL22protocolIsInHTTPFamilyEv
 #endif

Modified: trunk/Source/WebCore/platform/KURLWTFURL.cpp (128700 => 128701)


--- trunk/Source/WebCore/platform/KURLWTFURL.cpp	2012-09-16 04:24:24 UTC (rev 128700)
+++ trunk/Source/WebCore/platform/KURLWTFURL.cpp	2012-09-16 04:34:58 UTC (rev 128701)
@@ -113,7 +113,7 @@
 const String& KURL::string() const
 {
     if (isNull())
-        return nullAtom();
+        return emptyString();
 
     if (isValid())
         return m_urlImpl->m_parsedURL.spec().string();

Modified: trunk/Source/WebCore/platform/KURLWTFURLImpl.h (128700 => 128701)


--- trunk/Source/WebCore/platform/KURLWTFURLImpl.h	2012-09-16 04:24:24 UTC (rev 128700)
+++ trunk/Source/WebCore/platform/KURLWTFURLImpl.h	2012-09-16 04:34:58 UTC (rev 128701)
@@ -28,6 +28,7 @@
 
 #if USE(WTFURL)
 
+#include "PlatformMemoryInstrumentation.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
@@ -41,8 +42,7 @@
     WTF::ParsedURL m_parsedURL;
     String m_invalidUrlString;
 
-    template<typename MemoruObjectInfo>
-    void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo)
+    void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     {
         typename MemoryObjectInfo::ClassInfo info(memoryObjectInfo, this);
         info.addInstrumentedMember(m_parsedURL);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to