Chromium Code Reviews

Unified Diff: webkit/glue/chromium_bridge_impl.cc

Issue 11544: Remove use of wide characters in stats table identifiers. (Closed)
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « net/url_request/url_request.cc ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/chromium_bridge_impl.cc
diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc
index 7427e397f8ef50f0ad0b54503ad8c7d232e86f65..c4f3aae5992572ce709bd4ef363b3db1091e1fce 100644
--- a/webkit/glue/chromium_bridge_impl.cc
+++ b/webkit/glue/chromium_bridge_impl.cc
@@ -474,17 +474,22 @@ void ChromiumBridge::stopSharedTimer() {
// StatsCounters --------------------------------------------------------------
-void ChromiumBridge::decrementStatsCounter(const wchar_t* name) {
+void ChromiumBridge::decrementStatsCounter(const char* name) {
StatsCounter(name).Decrement();
}
-void ChromiumBridge::incrementStatsCounter(const wchar_t* name) {
+void ChromiumBridge::incrementStatsCounter(const char* name) {
StatsCounter(name).Increment();
}
#if USE(V8)
+// TODO(evanm): remove this conversion thunk once v8 supports plain char*
+// counter functions.
+static int* CounterFunction(const wchar_t* name) {
+ return StatsTable::FindLocation(WideToASCII(name).c_str());
+}
void ChromiumBridge::initV8CounterFunction() {
- v8::V8::SetCounterFunction(StatsTable::FindLocation);
+ v8::V8::SetCounterFunction(CounterFunction);
}
#endif
« no previous file with comments | « net/url_request/url_request.cc ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine