Commit a82746fd authored by benjamin@webkit.org's avatar benjamin@webkit.org
Browse files

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):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 202b364e
2012-09-15 Benjamin Poulain <benjamin@webkit.org>
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 <rakuco@FreeBSD.org>
llint: Implement LOCAL_LABEL_STRING for the BSD platforms.
......
......@@ -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 @@ String ParsedURL::segment(const URLComponent& component) const
return segment;
}
void ParsedURL::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this);
info.addInstrumentedMember(m_spec);
}
#ifndef NDEBUG
#define SHOW_COMPONENT(parsedURL, componentName) \
......
......@@ -64,6 +64,8 @@ public:
const URLString& spec() { return m_spec; }
WTF_EXPORT_PRIVATE void reportMemoryUsage(MemoryObjectInfo*) const;
#ifndef NDEBUG
WTF_EXPORT_PRIVATE void print() const;
#endif
......
......@@ -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
{
......
......@@ -40,6 +40,8 @@ public:
const String& string() const { return m_string;}
void reportMemoryUsage(MemoryObjectInfo*) const;
#ifndef NDEBUG
WTF_EXPORT_PRIVATE void print() const;
#endif
......
2012-09-15 Benjamin Poulain <benjamin@webkit.org>
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 <krit@webkit.org>
 
Add ClipPathOperation for -webkit-clip-path organization
......@@ -2565,7 +2565,9 @@ __ZN7WebCore12WorkerThread17workerThreadCountEv
#if USE(WTFURL)
__ZNK7WebCore4KURL6stringEv
__ZNK7WebCore4KURL7hasPortEv
__ZNK7WebCore4KURL7isEmptyEv
__ZNK7WebCore4KURL6isNullEv
__ZNK7WebCore4KURL7isValidEv
__ZNK7WebCore4KURL22protocolIsInHTTPFamilyEv
#endif
......
......@@ -113,7 +113,7 @@ bool KURL::isValid() const
const String& KURL::string() const
{
if (isNull())
return nullAtom();
return emptyString();
if (isValid())
return m_urlImpl->m_parsedURL.spec().string();
......
......@@ -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 @@ public:
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment