From de192555cc1360367e70f681768f6eb5bd011fcb Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 2 Dec 2011 18:06:28 +0000 Subject: [PATCH] Disable stats, histogram and event tracing to avoid memory leaks (issue #328). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@402 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- libcef/browser_webkit_init.cc | 27 +++++++++++++++++++++++++++ libcef/browser_webkit_init.h | 11 +++++++++++ 2 files changed, 38 insertions(+) diff --git a/libcef/browser_webkit_init.cc b/libcef/browser_webkit_init.cc index 30ec2ac37..99a1d0287 100644 --- a/libcef/browser_webkit_init.cc +++ b/libcef/browser_webkit_init.cc @@ -149,6 +149,33 @@ BrowserWebKitInit::createMessagePortChannel() { void BrowserWebKitInit::prefetchHostName(const WebKit::WebString&) { } +void BrowserWebKitInit::decrementStatsCounter(const char* name) { +} + +void BrowserWebKitInit::incrementStatsCounter(const char* name) { +} + +void BrowserWebKitInit::histogramCustomCounts(const char* name, int sample, + int min, int max, + int bucket_count) { +} + +void BrowserWebKitInit::histogramEnumeration(const char* name, int sample, + int boundary_value) { +} + +bool BrowserWebKitInit::isTraceEventEnabled() const { + return false; +} + +void BrowserWebKitInit::traceEventBegin(const char* name, void* id, + const char* extra) { +} + +void BrowserWebKitInit::traceEventEnd(const char* name, void* id, + const char* extra) { +} + WebKit::WebData BrowserWebKitInit::loadResource(const char* name) { if (!strcmp(name, "deleteButton")) { // Create a red 30x30 square. diff --git a/libcef/browser_webkit_init.h b/libcef/browser_webkit_init.h index f1351b145..3d782ffec 100644 --- a/libcef/browser_webkit_init.h +++ b/libcef/browser_webkit_init.h @@ -47,6 +47,17 @@ class BrowserWebKitInit : public webkit_glue::WebKitPlatformSupportImpl { virtual bool isLinkVisited(unsigned long long linkHash) OVERRIDE; virtual WebKit::WebMessagePortChannel* createMessagePortChannel() OVERRIDE; virtual void prefetchHostName(const WebKit::WebString&) OVERRIDE; + virtual void decrementStatsCounter(const char* name) OVERRIDE; + virtual void incrementStatsCounter(const char* name) OVERRIDE; + virtual void histogramCustomCounts(const char* name, int sample, int min, + int max, int bucket_count) OVERRIDE; + virtual void histogramEnumeration(const char* name, int sample, + int boundary_value) OVERRIDE; + virtual bool isTraceEventEnabled() const OVERRIDE; + virtual void traceEventBegin(const char* name, void* id, + const char* extra) OVERRIDE; + virtual void traceEventEnd(const char* name, void* id, + const char* extra) OVERRIDE; virtual WebKit::WebData loadResource(const char* name) OVERRIDE; virtual WebKit::WebString defaultLocale() OVERRIDE; virtual WebKit::WebStorageNamespace* createLocalStorageNamespace(