summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-22 00:37:21 +0000
committerevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-22 00:37:21 +0000
commit7a1c5ab3654723cfe4489e6981dcd67da1489f3f (patch)
treefca8c695a824dd834b95c29b5f618f6673066a5f /webkit
parentf5eddaf87e378c29412a028e027f91d48fbab551 (diff)
downloadchromium_src-7a1c5ab3654723cfe4489e6981dcd67da1489f3f.zip
chromium_src-7a1c5ab3654723cfe4489e6981dcd67da1489f3f.tar.gz
chromium_src-7a1c5ab3654723cfe4489e6981dcd67da1489f3f.tar.bz2
Remove use of wide characters in stats table identifiers.
Review URL: http://codereview.chromium.org/11544 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/chromium_bridge_impl.cc11
-rw-r--r--webkit/glue/plugins/plugin_lib.cc4
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl.cc4
-rw-r--r--webkit/glue/webframe_impl.cc7
-rw-r--r--webkit/port/bindings/scripts/CodeGeneratorV8.pm12
-rw-r--r--webkit/port/bindings/v8/V8MessagePortCustom.cpp14
-rw-r--r--webkit/port/bindings/v8/V8XMLHttpRequestCustom.cpp68
-rw-r--r--webkit/port/bindings/v8/npruntime.cpp2
-rw-r--r--webkit/port/bindings/v8/v8_custom.cpp220
-rw-r--r--webkit/port/platform/chromium/ChromiumBridge.h5
-rw-r--r--webkit/tools/test_shell/mac/main.mm6
-rw-r--r--webkit/tools/test_shell/test_shell.cc4
-rw-r--r--webkit/tools/test_shell/test_shell_main.cc4
13 files changed, 183 insertions, 178 deletions
diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc
index 515e2e8..9745a76 100644
--- a/webkit/glue/chromium_bridge_impl.cc
+++ b/webkit/glue/chromium_bridge_impl.cc
@@ -445,17 +445,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
diff --git a/webkit/glue/plugins/plugin_lib.cc b/webkit/glue/plugins/plugin_lib.cc
index c79d2cf..96296dc 100644
--- a/webkit/glue/plugins/plugin_lib.cc
+++ b/webkit/glue/plugins/plugin_lib.cc
@@ -29,8 +29,8 @@
namespace NPAPI
{
-const wchar_t kPluginLibrariesLoadedCounter[] = L"PluginLibrariesLoaded";
-const wchar_t kPluginInstancesActiveCounter[] = L"PluginInstancesActive";
+const char kPluginLibrariesLoadedCounter[] = "PluginLibrariesLoaded";
+const char kPluginInstancesActiveCounter[] = "PluginInstancesActive";
PluginLib::PluginMap* PluginLib::loaded_libs_;
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/glue/plugins/webplugin_delegate_impl.cc
index fd31ab7..9282de7 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl.cc
@@ -22,7 +22,7 @@
#include "webkit/glue/plugins/plugin_stream_url.h"
#include "webkit/glue/webkit_glue.h"
-static StatsCounter windowless_queue(L"Plugin.ThrottleQueue");
+static StatsCounter windowless_queue("Plugin.ThrottleQueue");
static const wchar_t kNativeWindowClassName[] = L"NativeWindowClass";
static const wchar_t kWebPluginDelegateProperty[] =
@@ -885,7 +885,7 @@ void WebPluginDelegateImpl::WindowlessPaint(HDC hdc,
// NOTE: NPAPI is not 64bit safe. It puts pointers into 32bit values.
paint_event.wParam = PtrToUlong(hdc);
paint_event.lParam = PtrToUlong(&damage_rect_win);
- static StatsRate plugin_paint(L"Plugin.Paint");
+ static StatsRate plugin_paint("Plugin.Paint");
StatsScope<StatsRate> scope(plugin_paint);
instance()->NPP_HandleEvent(&paint_event);
}
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 4ee45f9..a5a8fda 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -183,7 +183,8 @@ using WebCore::XPathResult;
// once we figure out how to make tickmark support work again!
static const size_t kNoTickmark = size_t(-1);
-static const wchar_t* const kWebFrameActiveCount = L"WebFrameActiveCount";
+// Key for a StatsCounter tracking how many WebFrames are active.
+static const char* const kWebFrameActiveCount = "WebFrameActiveCount";
static const char* const kOSDType = "application/opensearchdescription+xml";
static const char* const kOSDRel = "search";
@@ -487,7 +488,7 @@ bool WebFrameImpl::GetPreviousState(GURL* url, std::wstring* title,
if (!item)
return false;
- static StatsCounterTimer history_timer(L"GetHistoryTimer");
+ static StatsCounterTimer history_timer("GetHistoryTimer");
StatsScope<StatsCounterTimer> history_scope(history_timer);
webkit_glue::HistoryItemToString(item, history_state);
@@ -1474,7 +1475,7 @@ void WebFrameImpl::Layout() {
}
void WebFrameImpl::Paint(gfx::PlatformCanvas* canvas, const gfx::Rect& rect) {
- static StatsRate rendering(L"WebFramePaintTime");
+ static StatsRate rendering("WebFramePaintTime");
StatsScope<StatsRate> rendering_scope(rendering);
if (!rect.IsEmpty()) {
diff --git a/webkit/port/bindings/scripts/CodeGeneratorV8.pm b/webkit/port/bindings/scripts/CodeGeneratorV8.pm
index 1738afa..c80358b 100644
--- a/webkit/port/bindings/scripts/CodeGeneratorV8.pm
+++ b/webkit/port/bindings/scripts/CodeGeneratorV8.pm
@@ -378,7 +378,7 @@ sub GenerateDomainSafeFunctionGetter
push(@implContentDecls, <<END);
static v8::Handle<v8::Value> ${funcName}AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) {
- INC_STATS(L\"DOM.$implClassName.$funcName._get\");
+ INC_STATS(\"DOM.$implClassName.$funcName._get\");
static v8::Persistent<v8::FunctionTemplate> private_template =
v8::Persistent<v8::FunctionTemplate>::New($newTemplateString);
v8::Handle<v8::Object> holder = V8Proxy::LookupDOMWrapper(V8ClassIndex::$classIndex, info.This());
@@ -412,7 +412,7 @@ sub GenerateConstructorGetter
push(@implContentDecls, <<END);
static v8::Handle<v8::Value> ${implClassName}ConstructorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) {
- INC_STATS(L\"DOM.$implClassName.constructors._get\");
+ INC_STATS(\"DOM.$implClassName.constructors._get\");
v8::Handle<v8::Value> data = info.Data();
ASSERT(data->IsNumber());
@@ -473,7 +473,7 @@ sub GenerateNormalAttrGetter
# Getter
push(@implContentDecls, <<END);
static v8::Handle<v8::Value> ${attrName}AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) {
- INC_STATS(L\"DOM.$implClassName.$attrName._get\");
+ INC_STATS(\"DOM.$implClassName.$attrName._get\");
END
if ($isPodType) {
@@ -621,7 +621,7 @@ sub GenerateReplaceableAttrSetter
" static void ${attrName}AttrSetter(v8::Local<v8::String> name," .
" v8::Local<v8::Value> value, const v8::AccessorInfo& info)\n{\n");
- push(@implContentDecls, " INC_STATS(L\"DOM.$implClassName.$attrName._set\");\n");
+ push(@implContentDecls, " INC_STATS(\"DOM.$implClassName.$attrName._set\");\n");
push(@implContentDecls, " v8::Local<v8::String> ${attrName}_string = v8::String::New(\"${attrName}\");\n");
push(@implContentDecls, " info.Holder()->Delete(${attrName}_string);\n");
@@ -645,7 +645,7 @@ sub GenerateNormalAttrSetter
" static void ${attrName}AttrSetter(v8::Local<v8::String> name," .
" v8::Local<v8::Value> value, const v8::AccessorInfo& info)\n{\n");
- push(@implContentDecls, " INC_STATS(L\"DOM.$implClassName.$attrName._set\");\n");
+ push(@implContentDecls, " INC_STATS(\"DOM.$implClassName.$attrName._set\");\n");
my $isPodType = $codeGenerator->IsPodType($implClassName);
@@ -758,7 +758,7 @@ sub GenerateFunctionCallback
push(@implContentDecls,
" static v8::Handle<v8::Value> ${name}Callback(const v8::Arguments& args)\n{\n" .
-" INC_STATS(L\"DOM.$implClassName.$name\");\n");
+" INC_STATS(\"DOM.$implClassName.$name\");\n");
my $numParameters = @{$function->parameters};
diff --git a/webkit/port/bindings/v8/V8MessagePortCustom.cpp b/webkit/port/bindings/v8/V8MessagePortCustom.cpp
index 4699f08..5f13f30 100644
--- a/webkit/port/bindings/v8/V8MessagePortCustom.cpp
+++ b/webkit/port/bindings/v8/V8MessagePortCustom.cpp
@@ -81,7 +81,7 @@ static void RemoveHiddenDependency(v8::Local<v8::Object> object,
}
ACCESSOR_GETTER(MessagePortOnmessage) {
- INC_STATS(L"DOM.MessagePort.onmessage._get");
+ INC_STATS("DOM.MessagePort.onmessage._get");
MessagePort* imp = V8Proxy::ToNativeObject<MessagePort>(
V8ClassIndex::MESSAGEPORT, info.Holder());
if (imp->onmessage()) {
@@ -94,7 +94,7 @@ ACCESSOR_GETTER(MessagePortOnmessage) {
}
ACCESSOR_SETTER(MessagePortOnmessage) {
- INC_STATS(L"DOM.MessagePort.onmessage._set");
+ INC_STATS("DOM.MessagePort.onmessage._set");
MessagePort* imp = V8Proxy::ToNativeObject<MessagePort>(
V8ClassIndex::MESSAGEPORT, info.Holder());
if (value->IsNull()) {
@@ -123,7 +123,7 @@ ACCESSOR_SETTER(MessagePortOnmessage) {
}
ACCESSOR_GETTER(MessagePortOnclose) {
- INC_STATS(L"DOM.MessagePort.onclose._get");
+ INC_STATS("DOM.MessagePort.onclose._get");
MessagePort* imp = V8Proxy::ToNativeObject<MessagePort>(
V8ClassIndex::MESSAGEPORT, info.Holder());
if (imp->onclose()) {
@@ -136,7 +136,7 @@ ACCESSOR_GETTER(MessagePortOnclose) {
}
ACCESSOR_SETTER(MessagePortOnclose) {
- INC_STATS(L"DOM.MessagePort.onclose._set");
+ INC_STATS("DOM.MessagePort.onclose._set");
MessagePort* imp = V8Proxy::ToNativeObject<MessagePort>(
V8ClassIndex::MESSAGEPORT, info.Holder());
if (value->IsNull()) {
@@ -164,7 +164,7 @@ ACCESSOR_SETTER(MessagePortOnclose) {
}
CALLBACK_FUNC_DECL(MessagePortStartConversation) {
- INC_STATS(L"DOM.MessagePort.StartConversation()");
+ INC_STATS("DOM.MessagePort.StartConversation()");
if (args.Length() < 1) {
V8Proxy::ThrowError(V8Proxy::SYNTAX_ERROR, "Not enough arguments");
return v8::Undefined();
@@ -186,7 +186,7 @@ CALLBACK_FUNC_DECL(MessagePortStartConversation) {
}
CALLBACK_FUNC_DECL(MessagePortAddEventListener) {
- INC_STATS(L"DOM.MessagePort.AddEventListener()");
+ INC_STATS("DOM.MessagePort.AddEventListener()");
MessagePort* imp = V8Proxy::ToNativeObject<MessagePort>(
V8ClassIndex::MESSAGEPORT, args.Holder());
@@ -207,7 +207,7 @@ CALLBACK_FUNC_DECL(MessagePortAddEventListener) {
}
CALLBACK_FUNC_DECL(MessagePortRemoveEventListener) {
- INC_STATS(L"DOM.MessagePort.RemoveEventListener()");
+ INC_STATS("DOM.MessagePort.RemoveEventListener()");
MessagePort* imp = V8Proxy::ToNativeObject<MessagePort>(
V8ClassIndex::MESSAGEPORT, args.Holder());
diff --git a/webkit/port/bindings/v8/V8XMLHttpRequestCustom.cpp b/webkit/port/bindings/v8/V8XMLHttpRequestCustom.cpp
index 3a9653c..b40d659 100644
--- a/webkit/port/bindings/v8/V8XMLHttpRequestCustom.cpp
+++ b/webkit/port/bindings/v8/V8XMLHttpRequestCustom.cpp
@@ -45,7 +45,7 @@
namespace WebCore {
CALLBACK_FUNC_DECL(XMLHttpRequestConstructor) {
- INC_STATS(L"DOM.XMLHttpRequest.Constructor");
+ INC_STATS("DOM.XMLHttpRequest.Constructor");
if (!args.IsConstructCall()) {
V8Proxy::ThrowError(V8Proxy::TYPE_ERROR,
@@ -104,7 +104,7 @@ static void RemoveHiddenXHRDependency(v8::Local<v8::Object> xhr,
}
ACCESSOR_GETTER(XMLHttpRequestOnabort) {
- INC_STATS(L"DOM.XMLHttpRequest.onabort._get");
+ INC_STATS("DOM.XMLHttpRequest.onabort._get");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, info.Holder());
if (imp->onabort()) {
@@ -117,7 +117,7 @@ ACCESSOR_GETTER(XMLHttpRequestOnabort) {
}
ACCESSOR_SETTER(XMLHttpRequestOnabort) {
- INC_STATS(L"DOM.XMLHttpRequest.onabort._set");
+ INC_STATS("DOM.XMLHttpRequest.onabort._set");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, info.Holder());
if (value->IsNull()) {
@@ -145,7 +145,7 @@ ACCESSOR_SETTER(XMLHttpRequestOnabort) {
}
ACCESSOR_GETTER(XMLHttpRequestOnerror) {
- INC_STATS(L"DOM.XMLHttpRequest.onerror._get");
+ INC_STATS("DOM.XMLHttpRequest.onerror._get");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, info.Holder());
if (imp->onerror()) {
@@ -158,7 +158,7 @@ ACCESSOR_GETTER(XMLHttpRequestOnerror) {
}
ACCESSOR_SETTER(XMLHttpRequestOnerror) {
- INC_STATS(L"DOM.XMLHttpRequest.onerror._set");
+ INC_STATS("DOM.XMLHttpRequest.onerror._set");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, info.Holder());
if (value->IsNull()) {
@@ -186,7 +186,7 @@ ACCESSOR_SETTER(XMLHttpRequestOnerror) {
}
ACCESSOR_GETTER(XMLHttpRequestOnload) {
- INC_STATS(L"DOM.XMLHttpRequest.onload._get");
+ INC_STATS("DOM.XMLHttpRequest.onload._get");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, info.Holder());
if (imp->onload()) {
@@ -200,7 +200,7 @@ ACCESSOR_GETTER(XMLHttpRequestOnload) {
ACCESSOR_SETTER(XMLHttpRequestOnload)
{
- INC_STATS(L"DOM.XMLHttpRequest.onload._set");
+ INC_STATS("DOM.XMLHttpRequest.onload._set");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, info.Holder());
if (value->IsNull()) {
@@ -227,7 +227,7 @@ ACCESSOR_SETTER(XMLHttpRequestOnload)
}
ACCESSOR_GETTER(XMLHttpRequestOnloadstart) {
- INC_STATS(L"DOM.XMLHttpRequest.onloadstart._get");
+ INC_STATS("DOM.XMLHttpRequest.onloadstart._get");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, info.Holder());
if (imp->onloadstart()) {
@@ -240,7 +240,7 @@ ACCESSOR_GETTER(XMLHttpRequestOnloadstart) {
}
ACCESSOR_SETTER(XMLHttpRequestOnloadstart) {
- INC_STATS(L"DOM.XMLHttpRequest.onloadstart._set");
+ INC_STATS("DOM.XMLHttpRequest.onloadstart._set");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, info.Holder());
if (value->IsNull()) {
@@ -268,7 +268,7 @@ ACCESSOR_SETTER(XMLHttpRequestOnloadstart) {
}
ACCESSOR_GETTER(XMLHttpRequestOnprogress) {
- INC_STATS(L"DOM.XMLHttpRequest.onprogress._get");
+ INC_STATS("DOM.XMLHttpRequest.onprogress._get");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, info.Holder());
if (imp->onprogress()) {
@@ -281,7 +281,7 @@ ACCESSOR_GETTER(XMLHttpRequestOnprogress) {
}
ACCESSOR_SETTER(XMLHttpRequestOnprogress) {
- INC_STATS(L"DOM.XMLHttpRequest.onprogress._set");
+ INC_STATS("DOM.XMLHttpRequest.onprogress._set");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, info.Holder());
if (value->IsNull()) {
@@ -309,7 +309,7 @@ ACCESSOR_SETTER(XMLHttpRequestOnprogress) {
}
ACCESSOR_GETTER(XMLHttpRequestOnreadystatechange) {
- INC_STATS(L"DOM.XMLHttpRequest.onreadystatechange._get");
+ INC_STATS("DOM.XMLHttpRequest.onreadystatechange._get");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, info.Holder());
if (imp->onreadystatechange()) {
@@ -323,7 +323,7 @@ ACCESSOR_GETTER(XMLHttpRequestOnreadystatechange) {
ACCESSOR_SETTER(XMLHttpRequestOnreadystatechange)
{
- INC_STATS(L"DOM.XMLHttpRequest.onreadystatechange._set");
+ INC_STATS("DOM.XMLHttpRequest.onreadystatechange._set");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, info.Holder());
if (value->IsNull()) {
@@ -352,7 +352,7 @@ ACCESSOR_SETTER(XMLHttpRequestOnreadystatechange)
CALLBACK_FUNC_DECL(XMLHttpRequestAddEventListener)
{
- INC_STATS(L"DOM.XMLHttpRequest.addEventListener()");
+ INC_STATS("DOM.XMLHttpRequest.addEventListener()");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, args.Holder());
@@ -373,7 +373,7 @@ CALLBACK_FUNC_DECL(XMLHttpRequestAddEventListener)
}
CALLBACK_FUNC_DECL(XMLHttpRequestRemoveEventListener) {
- INC_STATS(L"DOM.XMLHttpRequest.removeEventListener()");
+ INC_STATS("DOM.XMLHttpRequest.removeEventListener()");
XMLHttpRequest* imp = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, args.Holder());
@@ -397,7 +397,7 @@ CALLBACK_FUNC_DECL(XMLHttpRequestRemoveEventListener) {
CALLBACK_FUNC_DECL(XMLHttpRequestOpen)
{
- INC_STATS(L"DOM.XMLHttpRequest.open()");
+ INC_STATS("DOM.XMLHttpRequest.open()");
// Four cases:
// open(method, url)
// open(method, url, async)
@@ -450,7 +450,7 @@ static bool IsDocumentType(v8::Handle<v8::Value> value)
CALLBACK_FUNC_DECL(XMLHttpRequestSend)
{
- INC_STATS(L"DOM.XMLHttpRequest.send()");
+ INC_STATS("DOM.XMLHttpRequest.send()");
XMLHttpRequest* xhr = V8Proxy::ToNativeObject<XMLHttpRequest>(
V8ClassIndex::XMLHTTPREQUEST, args.Holder());
@@ -478,7 +478,7 @@ CALLBACK_FUNC_DECL(XMLHttpRequestSend)
}
CALLBACK_FUNC_DECL(XMLHttpRequestSetRequestHeader) {
- INC_STATS(L"DOM.XMLHttpRequest.setRequestHeader()");
+ INC_STATS("DOM.XMLHttpRequest.setRequestHeader()");
if (args.Length() < 2) {
V8Proxy::ThrowError(V8Proxy::SYNTAX_ERROR, "Not enough arguments");
return v8::Undefined();
@@ -498,7 +498,7 @@ CALLBACK_FUNC_DECL(XMLHttpRequestSetRequestHeader) {
}
CALLBACK_FUNC_DECL(XMLHttpRequestGetResponseHeader) {
- INC_STATS(L"DOM.XMLHttpRequest.getResponseHeader()");
+ INC_STATS("DOM.XMLHttpRequest.getResponseHeader()");
if (args.Length() < 1) {
V8Proxy::ThrowError(V8Proxy::SYNTAX_ERROR, "Not enough arguments");
return v8::Undefined();
@@ -518,7 +518,7 @@ CALLBACK_FUNC_DECL(XMLHttpRequestGetResponseHeader) {
CALLBACK_FUNC_DECL(XMLHttpRequestOverrideMimeType)
{
- INC_STATS(L"DOM.XMLHttpRequest.overrideMimeType()");
+ INC_STATS("DOM.XMLHttpRequest.overrideMimeType()");
if (args.Length() < 1) {
V8Proxy::ThrowError(V8Proxy::SYNTAX_ERROR, "Not enough arguments");
return v8::Undefined();
@@ -533,7 +533,7 @@ CALLBACK_FUNC_DECL(XMLHttpRequestOverrideMimeType)
CALLBACK_FUNC_DECL(XMLHttpRequestDispatchEvent)
{
- INC_STATS(L"DOM.XMLHttpRequest.dispatchEvent()");
+ INC_STATS("DOM.XMLHttpRequest.dispatchEvent()");
return v8::Undefined();
}
@@ -541,7 +541,7 @@ CALLBACK_FUNC_DECL(XMLHttpRequestDispatchEvent)
// XMLHttpRequestUpload --------------------------------------------------------
ACCESSOR_GETTER(XMLHttpRequestUploadOnabort) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.onabort._get");
+ INC_STATS("DOM.XMLHttpRequestUpload.onabort._get");
XMLHttpRequestUpload* imp = V8Proxy::ToNativeObject<XMLHttpRequestUpload>(
V8ClassIndex::XMLHTTPREQUESTUPLOAD, info.Holder());
if (imp->onabort()) {
@@ -554,7 +554,7 @@ ACCESSOR_GETTER(XMLHttpRequestUploadOnabort) {
}
ACCESSOR_SETTER(XMLHttpRequestUploadOnabort) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.onabort._set");
+ INC_STATS("DOM.XMLHttpRequestUpload.onabort._set");
XMLHttpRequestUpload* imp = V8Proxy::ToNativeObject<XMLHttpRequestUpload>(
V8ClassIndex::XMLHTTPREQUESTUPLOAD, info.Holder());
if (value->IsNull()) {
@@ -584,7 +584,7 @@ ACCESSOR_SETTER(XMLHttpRequestUploadOnabort) {
}
ACCESSOR_GETTER(XMLHttpRequestUploadOnerror) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.onerror._get");
+ INC_STATS("DOM.XMLHttpRequestUpload.onerror._get");
XMLHttpRequestUpload* imp = V8Proxy::ToNativeObject<XMLHttpRequestUpload>(
V8ClassIndex::XMLHTTPREQUESTUPLOAD, info.Holder());
if (imp->onerror()) {
@@ -597,7 +597,7 @@ ACCESSOR_GETTER(XMLHttpRequestUploadOnerror) {
}
ACCESSOR_SETTER(XMLHttpRequestUploadOnerror) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.onerror._set");
+ INC_STATS("DOM.XMLHttpRequestUpload.onerror._set");
XMLHttpRequestUpload* imp = V8Proxy::ToNativeObject<XMLHttpRequestUpload>(
V8ClassIndex::XMLHTTPREQUESTUPLOAD, info.Holder());
if (value->IsNull()) {
@@ -626,7 +626,7 @@ ACCESSOR_SETTER(XMLHttpRequestUploadOnerror) {
}
ACCESSOR_GETTER(XMLHttpRequestUploadOnload) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.onload._get");
+ INC_STATS("DOM.XMLHttpRequestUpload.onload._get");
XMLHttpRequestUpload* imp = V8Proxy::ToNativeObject<XMLHttpRequestUpload>(
V8ClassIndex::XMLHTTPREQUESTUPLOAD, info.Holder());
if (imp->onload()) {
@@ -639,7 +639,7 @@ ACCESSOR_GETTER(XMLHttpRequestUploadOnload) {
}
ACCESSOR_SETTER(XMLHttpRequestUploadOnload) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.onload._set");
+ INC_STATS("DOM.XMLHttpRequestUpload.onload._set");
XMLHttpRequestUpload* imp = V8Proxy::ToNativeObject<XMLHttpRequestUpload>(
V8ClassIndex::XMLHTTPREQUESTUPLOAD, info.Holder());
if (value->IsNull()) {
@@ -668,7 +668,7 @@ ACCESSOR_SETTER(XMLHttpRequestUploadOnload) {
}
ACCESSOR_GETTER(XMLHttpRequestUploadOnloadstart) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.onloadstart._get");
+ INC_STATS("DOM.XMLHttpRequestUpload.onloadstart._get");
XMLHttpRequestUpload* imp = V8Proxy::ToNativeObject<XMLHttpRequestUpload>(
V8ClassIndex::XMLHTTPREQUESTUPLOAD, info.Holder());
if (imp->onloadstart()) {
@@ -681,7 +681,7 @@ ACCESSOR_GETTER(XMLHttpRequestUploadOnloadstart) {
}
ACCESSOR_SETTER(XMLHttpRequestUploadOnloadstart) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.onloadstart._set");
+ INC_STATS("DOM.XMLHttpRequestUpload.onloadstart._set");
XMLHttpRequestUpload* imp = V8Proxy::ToNativeObject<XMLHttpRequestUpload>(
V8ClassIndex::XMLHTTPREQUESTUPLOAD, info.Holder());
if (value->IsNull()) {
@@ -710,7 +710,7 @@ ACCESSOR_SETTER(XMLHttpRequestUploadOnloadstart) {
}
ACCESSOR_GETTER(XMLHttpRequestUploadOnprogress) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.onprogress._get");
+ INC_STATS("DOM.XMLHttpRequestUpload.onprogress._get");
XMLHttpRequestUpload* imp = V8Proxy::ToNativeObject<XMLHttpRequestUpload>(
V8ClassIndex::XMLHTTPREQUESTUPLOAD, info.Holder());
if (imp->onprogress()) {
@@ -723,7 +723,7 @@ ACCESSOR_GETTER(XMLHttpRequestUploadOnprogress) {
}
ACCESSOR_SETTER(XMLHttpRequestUploadOnprogress) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.onprogress._set");
+ INC_STATS("DOM.XMLHttpRequestUpload.onprogress._set");
XMLHttpRequestUpload* imp = V8Proxy::ToNativeObject<XMLHttpRequestUpload>(
V8ClassIndex::XMLHTTPREQUESTUPLOAD, info.Holder());
if (value->IsNull()) {
@@ -752,7 +752,7 @@ ACCESSOR_SETTER(XMLHttpRequestUploadOnprogress) {
}
CALLBACK_FUNC_DECL(XMLHttpRequestUploadAddEventListener) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.addEventListener()");
+ INC_STATS("DOM.XMLHttpRequestUpload.addEventListener()");
XMLHttpRequestUpload* imp = V8Proxy::ToNativeObject<XMLHttpRequestUpload>(
V8ClassIndex::XMLHTTPREQUESTUPLOAD, args.Holder());
@@ -774,7 +774,7 @@ CALLBACK_FUNC_DECL(XMLHttpRequestUploadAddEventListener) {
}
CALLBACK_FUNC_DECL(XMLHttpRequestUploadRemoveEventListener) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.removeEventListener()");
+ INC_STATS("DOM.XMLHttpRequestUpload.removeEventListener()");
XMLHttpRequestUpload* imp = V8Proxy::ToNativeObject<XMLHttpRequestUpload>(
V8ClassIndex::XMLHTTPREQUESTUPLOAD, args.Holder());
@@ -798,7 +798,7 @@ CALLBACK_FUNC_DECL(XMLHttpRequestUploadRemoveEventListener) {
}
CALLBACK_FUNC_DECL(XMLHttpRequestUploadDispatchEvent) {
- INC_STATS(L"DOM.XMLHttpRequestUpload.dispatchEvent()");
+ INC_STATS("DOM.XMLHttpRequestUpload.dispatchEvent()");
V8Proxy::SetDOMException(NOT_SUPPORTED_ERR);
return v8::Undefined();
}
diff --git a/webkit/port/bindings/v8/npruntime.cpp b/webkit/port/bindings/v8/npruntime.cpp
index 1c1007b..ca0c45a 100644
--- a/webkit/port/bindings/v8/npruntime.cpp
+++ b/webkit/port/bindings/v8/npruntime.cpp
@@ -169,7 +169,7 @@ void NPN_ReleaseVariantValue(NPVariant* variant) {
variant->type = NPVariantType_Void;
}
-static const wchar_t* kCounterNPObjects = L"NPObjects";
+static const char* kCounterNPObjects = "NPObjects";
NPObject *NPN_CreateObject(NPP npp, NPClass* aClass) {
ASSERT(aClass);
diff --git a/webkit/port/bindings/v8/v8_custom.cpp b/webkit/port/bindings/v8/v8_custom.cpp
index bd5acf5..57036bf 100644
--- a/webkit/port/bindings/v8/v8_custom.cpp
+++ b/webkit/port/bindings/v8/v8_custom.cpp
@@ -258,13 +258,13 @@ void V8ScheduledAction::execute(DOMWindow* window) {
CALLBACK_FUNC_DECL(DOMParserConstructor) {
- INC_STATS(L"DOM.DOMParser.Contructor");
+ INC_STATS("DOM.DOMParser.Contructor");
return V8Proxy::ConstructDOMObject<V8ClassIndex::DOMPARSER,
DOMParser>(args);
}
CALLBACK_FUNC_DECL(MessageChannelConstructor) {
- INC_STATS(L"DOM.MessageChannel.Constructor");
+ INC_STATS("DOM.MessageChannel.Constructor");
if (!args.IsConstructCall()) {
V8Proxy::ThrowError(V8Proxy::TYPE_ERROR,
"DOM object constructor cannot be called as a function.");
@@ -310,28 +310,28 @@ CALLBACK_FUNC_DECL(MessageChannelConstructor) {
CALLBACK_FUNC_DECL(XMLSerializerConstructor) {
- INC_STATS(L"DOM.XMLSerializer.Constructor");
+ INC_STATS("DOM.XMLSerializer.Constructor");
return V8Proxy::ConstructDOMObject<V8ClassIndex::XMLSERIALIZER,
XMLSerializer>(args);
}
CALLBACK_FUNC_DECL(XPathEvaluatorConstructor) {
- INC_STATS(L"DOM.XPathEvaluator.Constructor");
+ INC_STATS("DOM.XPathEvaluator.Constructor");
return V8Proxy::ConstructDOMObject<V8ClassIndex::XPATHEVALUATOR,
XPathEvaluator>(args);
}
CALLBACK_FUNC_DECL(XSLTProcessorConstructor) {
- INC_STATS(L"DOM.XSLTProcessor.Constructor");
+ INC_STATS("DOM.XSLTProcessor.Constructor");
return V8Proxy::ConstructDOMObject<V8ClassIndex::XSLTPROCESSOR,
XSLTProcessor>(args);
}
CALLBACK_FUNC_DECL(XSLTProcessorImportStylesheet) {
- INC_STATS(L"DOM.XSLTProcessor.importStylesheet");
+ INC_STATS("DOM.XSLTProcessor.importStylesheet");
// Return undefined if argument does not have the correct type.
if (!V8Node::HasInstance(args[0]))
return v8::Undefined();
@@ -346,7 +346,7 @@ CALLBACK_FUNC_DECL(XSLTProcessorImportStylesheet) {
CALLBACK_FUNC_DECL(XSLTProcessorTransformToFragment) {
- INC_STATS(L"DOM.XSLTProcessor.transformToFragment");
+ INC_STATS("DOM.XSLTProcessor.transformToFragment");
// Return undefined if arguments do not have correct types.
if (!V8Node::HasInstance(args[0]) || !V8Document::HasInstance(args[1]))
return v8::Undefined();
@@ -363,7 +363,7 @@ CALLBACK_FUNC_DECL(XSLTProcessorTransformToFragment) {
CALLBACK_FUNC_DECL(XSLTProcessorTransformToDocument) {
- INC_STATS(L"DOM.XSLTProcessor.transformToDocument");
+ INC_STATS("DOM.XSLTProcessor.transformToDocument");
// Return undefined if argument does not have the correct type.
if (!V8Node::HasInstance(args[0]))
return v8::Undefined();
@@ -383,7 +383,7 @@ CALLBACK_FUNC_DECL(XSLTProcessorTransformToDocument) {
CALLBACK_FUNC_DECL(XSLTProcessorSetParameter) {
- INC_STATS(L"DOM.XSLTProcessor.setParameter");
+ INC_STATS("DOM.XSLTProcessor.setParameter");
// Bail out if localName or value is null or undefined.
if (args[1]->IsNull() || args[1]->IsUndefined() ||
args[2]->IsNull() || args[2]->IsUndefined()) {
@@ -402,7 +402,7 @@ CALLBACK_FUNC_DECL(XSLTProcessorSetParameter) {
CALLBACK_FUNC_DECL(XSLTProcessorGetParameter) {
- INC_STATS(L"DOM.XSLTProcessor.getParameter");
+ INC_STATS("DOM.XSLTProcessor.getParameter");
// Bail out if localName is null or undefined.
if (args[1]->IsNull() || args[1]->IsUndefined()) {
return v8::Undefined();
@@ -421,7 +421,7 @@ CALLBACK_FUNC_DECL(XSLTProcessorGetParameter) {
CALLBACK_FUNC_DECL(XSLTProcessorRemoveParameter) {
- INC_STATS(L"DOM.XSLTProcessor.removeParameter");
+ INC_STATS("DOM.XSLTProcessor.removeParameter");
// Bail out if localName is null or undefined.
if (args[1]->IsNull() || args[1]->IsUndefined())
return v8::Undefined();
@@ -665,7 +665,7 @@ static v8::Handle<v8::Value> HTMLCollectionGetItem(
NAMED_PROPERTY_GETTER(HTMLCollection) {
- INC_STATS(L"DOM.HTMLCollection.NamedPropertyGetter");
+ INC_STATS("DOM.HTMLCollection.NamedPropertyGetter");
// Search the prototype chain first.
v8::Handle<v8::Value> value =
info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
@@ -688,7 +688,7 @@ NAMED_PROPERTY_GETTER(HTMLCollection) {
}
INDEXED_PROPERTY_GETTER(CanvasPixelArray) {
- INC_STATS(L"DOM.CanvasPixelArray.IndexedPropertyGetter");
+ INC_STATS("DOM.CanvasPixelArray.IndexedPropertyGetter");
CanvasPixelArray* pixelArray =
V8Proxy::ToNativeObject<CanvasPixelArray>(V8ClassIndex::CANVASPIXELARRAY,
info.Holder());
@@ -703,7 +703,7 @@ INDEXED_PROPERTY_GETTER(CanvasPixelArray) {
}
INDEXED_PROPERTY_SETTER(CanvasPixelArray) {
- INC_STATS(L"DOM.CanvasPixelArray.IndexedPropertySetter");
+ INC_STATS("DOM.CanvasPixelArray.IndexedPropertySetter");
CanvasPixelArray* pixelArray =
V8Proxy::ToNativeObject<CanvasPixelArray>(V8ClassIndex::CANVASPIXELARRAY,
info.Holder());
@@ -716,7 +716,7 @@ INDEXED_PROPERTY_SETTER(CanvasPixelArray) {
}
CALLBACK_FUNC_DECL(HTMLCollectionItem) {
- INC_STATS(L"DOM.HTMLCollection.item()");
+ INC_STATS("DOM.HTMLCollection.item()");
HTMLCollection* imp = V8Proxy::ToNativeObject<HTMLCollection>(
V8ClassIndex::HTMLCOLLECTION, args.Holder());
return HTMLCollectionGetItem(imp, args[0]);
@@ -724,7 +724,7 @@ CALLBACK_FUNC_DECL(HTMLCollectionItem) {
CALLBACK_FUNC_DECL(HTMLCollectionNamedItem) {
- INC_STATS(L"DOM.HTMLCollection.namedItem()");
+ INC_STATS("DOM.HTMLCollection.namedItem()");
HTMLCollection* imp = V8Proxy::ToNativeObject<HTMLCollection>(
V8ClassIndex::HTMLCOLLECTION, args.Holder());
String name = ToWebCoreString(args[0]);
@@ -738,7 +738,7 @@ CALLBACK_FUNC_DECL(HTMLCollectionNamedItem) {
CALLBACK_FUNC_DECL(HTMLCollectionCallAsFunction) {
- INC_STATS(L"DOM.HTMLCollection.callAsFunction()");
+ INC_STATS("DOM.HTMLCollection.callAsFunction()");
if (args.Length() < 1) return v8::Undefined();
HTMLCollection* imp = V8Proxy::ToNativeObject<HTMLCollection>(
@@ -779,14 +779,14 @@ static v8::Handle<v8::Value> V8HTMLSelectElementRemoveHelper(
}
CALLBACK_FUNC_DECL(HTMLSelectElementRemove) {
- INC_STATS(L"DOM.HTMLSelectElement.remove");
+ INC_STATS("DOM.HTMLSelectElement.remove");
HTMLSelectElement* imp =
V8Proxy::DOMWrapperToNode<HTMLSelectElement>(args.Holder());
return V8HTMLSelectElementRemoveHelper(imp, args);
}
CALLBACK_FUNC_DECL(HTMLOptionsCollectionRemove) {
- INC_STATS(L"DOM.HTMLOptionsCollection.remove()");
+ INC_STATS("DOM.HTMLOptionsCollection.remove()");
HTMLOptionsCollection* imp =
V8Proxy::ToNativeObject<HTMLOptionsCollection>(
V8ClassIndex::HTMLOPTIONSCOLLECTION, args.Holder());
@@ -796,7 +796,7 @@ CALLBACK_FUNC_DECL(HTMLOptionsCollectionRemove) {
CALLBACK_FUNC_DECL(HTMLOptionsCollectionAdd) {
- INC_STATS(L"DOM.HTMLOptionsCollection.add()");
+ INC_STATS("DOM.HTMLOptionsCollection.add()");
if (!V8HTMLOptionElement::HasInstance(args[0])) {
V8Proxy::SetDOMException(TYPE_MISMATCH_ERR);
return v8::Undefined();
@@ -831,7 +831,7 @@ CALLBACK_FUNC_DECL(HTMLOptionsCollectionAdd) {
CALLBACK_FUNC_DECL(DOMWindowAddEventListener) {
- INC_STATS(L"DOM.DOMWindow.addEventListener()");
+ INC_STATS("DOM.DOMWindow.addEventListener()");
DOMWindow* imp = V8Proxy::ToNativeObject<DOMWindow>(
V8ClassIndex::DOMWINDOW, args.Holder());
@@ -864,7 +864,7 @@ CALLBACK_FUNC_DECL(DOMWindowAddEventListener) {
CALLBACK_FUNC_DECL(DOMWindowRemoveEventListener) {
- INC_STATS(L"DOM.DOMWindow.removeEventListener()");
+ INC_STATS("DOM.DOMWindow.removeEventListener()");
DOMWindow* imp = V8Proxy::ToNativeObject<DOMWindow>(
V8ClassIndex::DOMWINDOW, args.Holder());
@@ -895,7 +895,7 @@ CALLBACK_FUNC_DECL(DOMWindowRemoveEventListener) {
}
CALLBACK_FUNC_DECL(DOMWindowPostMessage) {
- INC_STATS(L"DOM.DOMWindow.postMessage()");
+ INC_STATS("DOM.DOMWindow.postMessage()");
DOMWindow* window = V8Proxy::ToNativeObject<DOMWindow>(
V8ClassIndex::DOMWINDOW, args.Holder());
@@ -1051,7 +1051,7 @@ static Frame* createWindow(Frame* opener_frame,
CALLBACK_FUNC_DECL(DOMWindowShowModalDialog) {
- INC_STATS(L"DOM.DOMWindow.showModalDialog()");
+ INC_STATS("DOM.DOMWindow.showModalDialog()");
DOMWindow* window = V8Proxy::ToNativeObject<DOMWindow>(
V8ClassIndex::DOMWINDOW, args.Holder());
Frame* frame = window->frame();
@@ -1141,7 +1141,7 @@ CALLBACK_FUNC_DECL(DOMWindowShowModalDialog) {
CALLBACK_FUNC_DECL(DOMWindowOpen) {
- INC_STATS(L"DOM.DOMWindow.open()");
+ INC_STATS("DOM.DOMWindow.open()");
DOMWindow* parent = V8Proxy::ToNativeObject<DOMWindow>(
V8ClassIndex::DOMWINDOW, args.Holder());
Frame* frame = parent->frame();
@@ -1269,7 +1269,7 @@ CALLBACK_FUNC_DECL(DOMWindowOpen) {
INDEXED_PROPERTY_GETTER(DOMWindow) {
- INC_STATS(L"DOM.DOMWindow.IndexedPropertyGetter");
+ INC_STATS("DOM.DOMWindow.IndexedPropertyGetter");
v8::Handle<v8::Object> holder = V8Proxy::LookupDOMWrapper(
V8ClassIndex::DOMWINDOW, info.This());
if (holder.IsEmpty())
@@ -1294,7 +1294,7 @@ INDEXED_PROPERTY_GETTER(DOMWindow) {
NAMED_PROPERTY_GETTER(DOMWindow) {
- INC_STATS(L"DOM.DOMWindow.NamedPropertyGetter");
+ INC_STATS("DOM.DOMWindow.NamedPropertyGetter");
// The key must be a string.
if (!name->IsString())
return v8::Handle<v8::Value>();
@@ -1424,7 +1424,7 @@ NAMED_PROPERTY_DELETER(HTMLDocument) {
NAMED_PROPERTY_SETTER(HTMLDocument)
{
- INC_STATS(L"DOM.HTMLDocument.NamedPropertySetter");
+ INC_STATS("DOM.HTMLDocument.NamedPropertySetter");
// Only handle document.all. We insert the value into the shadow
// internal field from which the getter will retrieve it.
String key = ToWebCoreString(name);
@@ -1439,7 +1439,7 @@ NAMED_PROPERTY_SETTER(HTMLDocument)
NAMED_PROPERTY_GETTER(HTMLDocument)
{
- INC_STATS(L"DOM.HTMLDocument.NamedPropertyGetter");
+ INC_STATS("DOM.HTMLDocument.NamedPropertyGetter");
AtomicString key = ToWebCoreString(name);
// Special case for document.all. If the value in the shadow
@@ -1476,7 +1476,7 @@ NAMED_PROPERTY_GETTER(HTMLDocument)
NAMED_PROPERTY_GETTER(HTMLFrameSetElement)
{
- INC_STATS(L"DOM.HTMLFrameSetElement.NamedPropertyGetter");
+ INC_STATS("DOM.HTMLFrameSetElement.NamedPropertyGetter");
HTMLFrameSetElement* imp =
V8Proxy::DOMWrapperToNode<HTMLFrameSetElement>(info.Holder());
String key = ToWebCoreString(name);
@@ -1495,7 +1495,7 @@ NAMED_PROPERTY_GETTER(HTMLFrameSetElement)
NAMED_PROPERTY_GETTER(HTMLFormElement) {
- INC_STATS(L"DOM.HTMLFormElement.NamedPropertyGetter");
+ INC_STATS("DOM.HTMLFormElement.NamedPropertyGetter");
HTMLFormElement* imp =
V8Proxy::DOMWrapperToNode<HTMLFormElement>(info.Holder());
String v = ToWebCoreString(name);
@@ -1525,7 +1525,7 @@ NAMED_PROPERTY_GETTER(HTMLFormElement) {
INDEXED_PROPERTY_GETTER(NamedNodeMap) {
- INC_STATS(L"DOM.NamedNodeMap.IndexedPropertyGetter");
+ INC_STATS("DOM.NamedNodeMap.IndexedPropertyGetter");
NamedNodeMap* imp = V8Proxy::ToNativeObject<NamedNodeMap>(
V8ClassIndex::NAMEDNODEMAP, info.Holder());
RefPtr<Node> result = imp->item(index);
@@ -1535,7 +1535,7 @@ INDEXED_PROPERTY_GETTER(NamedNodeMap) {
}
NAMED_PROPERTY_GETTER(NamedNodeMap) {
- INC_STATS(L"DOM.NamedNodeMap.NamedPropertyGetter");
+ INC_STATS("DOM.NamedNodeMap.NamedPropertyGetter");
// Search the prototype chain first.
v8::Handle<v8::Value> value =
info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
@@ -1558,7 +1558,7 @@ NAMED_PROPERTY_GETTER(NamedNodeMap) {
NAMED_PROPERTY_GETTER(NodeList) {
- INC_STATS(L"DOM.NodeList.NamedPropertyGetter");
+ INC_STATS("DOM.NodeList.NamedPropertyGetter");
NodeList* list = V8Proxy::ToNativeObject<NodeList>(
V8ClassIndex::NODELIST, info.Holder());
String prop_name = ToWebCoreString(name);
@@ -1576,7 +1576,7 @@ NAMED_PROPERTY_GETTER(NodeList) {
INDEXED_PROPERTY_GETTER(HTMLFormElement) {
- INC_STATS(L"DOM.HTMLFormElement.IndexedPropertyGetter");
+ INC_STATS("DOM.HTMLFormElement.IndexedPropertyGetter");
HTMLFormElement* form =
V8Proxy::DOMWrapperToNode<HTMLFormElement>(info.Holder());
@@ -1587,7 +1587,7 @@ INDEXED_PROPERTY_GETTER(HTMLFormElement) {
INDEXED_PROPERTY_GETTER(HTMLOptionsCollection) {
- INC_STATS(L"DOM.HTMLOptionsCollection.IndexedPropertyGetter");
+ INC_STATS("DOM.HTMLOptionsCollection.IndexedPropertyGetter");
HTMLOptionsCollection* collection =
V8Proxy::ToNativeObject<HTMLOptionsCollection>(
V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
@@ -1625,7 +1625,7 @@ static v8::Handle<v8::Value> OptionsCollectionSetter(uint32_t index,
INDEXED_PROPERTY_SETTER(HTMLOptionsCollection) {
- INC_STATS(L"DOM.HTMLOptionsCollection.IndexedPropertySetter");
+ INC_STATS("DOM.HTMLOptionsCollection.IndexedPropertySetter");
HTMLOptionsCollection* collection =
V8Proxy::ToNativeObject<HTMLOptionsCollection>(
V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
@@ -1635,7 +1635,7 @@ INDEXED_PROPERTY_SETTER(HTMLOptionsCollection) {
INDEXED_PROPERTY_SETTER(HTMLSelectElementCollection) {
- INC_STATS(L"DOM.HTMLSelectElementCollection.IndexedPropertySetter");
+ INC_STATS("DOM.HTMLSelectElementCollection.IndexedPropertySetter");
HTMLSelectElement* select =
V8Proxy::DOMWrapperToNode<HTMLSelectElement>(info.Holder());
return OptionsCollectionSetter(index, value, select);
@@ -1728,7 +1728,7 @@ static String cssPropertyName(const String& propertyName, bool* hadPixelOrPosPre
}
NAMED_PROPERTY_GETTER(CSSStyleDeclaration) {
- INC_STATS(L"DOM.CSSStyleDeclaration.NamedPropertyGetter");
+ INC_STATS("DOM.CSSStyleDeclaration.NamedPropertyGetter");
// First look for API defined attributes on the style declaration
// object.
if (info.Holder()->HasRealNamedCallbackProperty(name))
@@ -1772,7 +1772,7 @@ NAMED_PROPERTY_GETTER(CSSStyleDeclaration) {
NAMED_PROPERTY_SETTER(CSSStyleDeclaration) {
- INC_STATS(L"DOM.CSSStyleDeclaration.NamedPropertySetter");
+ INC_STATS("DOM.CSSStyleDeclaration.NamedPropertySetter");
CSSStyleDeclaration* imp = V8Proxy::ToNativeObject<CSSStyleDeclaration>(
V8ClassIndex::CSSSTYLEDECLARATION, info.Holder());
String property_name = ToWebCoreString(name);
@@ -1794,7 +1794,7 @@ NAMED_PROPERTY_SETTER(CSSStyleDeclaration) {
NAMED_PROPERTY_GETTER(HTMLPlugInElement) {
- INC_STATS(L"DOM.HTMLPlugInElement.NamedPropertyGetter");
+ INC_STATS("DOM.HTMLPlugInElement.NamedPropertyGetter");
HTMLPlugInElement* imp =
V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(info.Holder());
v8::Local<v8::Object> instance =
@@ -1805,7 +1805,7 @@ NAMED_PROPERTY_GETTER(HTMLPlugInElement) {
NAMED_PROPERTY_SETTER(HTMLPlugInElement) {
- INC_STATS(L"DOM.HTMLPlugInElement.NamedPropertySetter");
+ INC_STATS("DOM.HTMLPlugInElement.NamedPropertySetter");
HTMLPlugInElement* imp =
V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(info.Holder());
v8::Local<v8::Object> instance =
@@ -1819,13 +1819,13 @@ NAMED_PROPERTY_SETTER(HTMLPlugInElement) {
CALLBACK_FUNC_DECL(HTMLPlugInElement) {
- INC_STATS(L"DOM.HTMLPluginElement()");
+ INC_STATS("DOM.HTMLPluginElement()");
return NPObjectInvokeDefaultHandler(args);
}
INDEXED_PROPERTY_GETTER(HTMLPlugInElement) {
- INC_STATS(L"DOM.HTMLPlugInElement.IndexedPropertyGetter");
+ INC_STATS("DOM.HTMLPlugInElement.IndexedPropertyGetter");
HTMLPlugInElement* imp =
V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(info.Holder());
v8::Local<v8::Object> instance =
@@ -1836,7 +1836,7 @@ INDEXED_PROPERTY_GETTER(HTMLPlugInElement) {
INDEXED_PROPERTY_SETTER(HTMLPlugInElement) {
- INC_STATS(L"DOM.HTMLPlugInElement.IndexedPropertySetter");
+ INC_STATS("DOM.HTMLPlugInElement.IndexedPropertySetter");
HTMLPlugInElement* imp =
V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(info.Holder());
v8::Local<v8::Object> instance =
@@ -1849,7 +1849,7 @@ INDEXED_PROPERTY_SETTER(HTMLPlugInElement) {
}
NAMED_PROPERTY_GETTER(StyleSheetList) {
- INC_STATS(L"DOM.StyleSheetList.NamedPropertyGetter");
+ INC_STATS("DOM.StyleSheetList.NamedPropertyGetter");
// Look for local properties first.
if (info.Holder()->HasRealNamedProperty(name)) {
return v8::Handle<v8::Value>();
@@ -1876,7 +1876,7 @@ NAMED_PROPERTY_GETTER(StyleSheetList) {
// TODO: SetStrokeColor and SetFillColor are similar except function names,
// consolidate them into one.
CALLBACK_FUNC_DECL(CanvasRenderingContext2DSetStrokeColor) {
- INC_STATS(L"DOM.CanvasRenderingContext2D.setStrokeColor()");
+ INC_STATS("DOM.CanvasRenderingContext2D.setStrokeColor()");
CanvasRenderingContext2D* context =
V8Proxy::ToNativeObject<CanvasRenderingContext2D>(
V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
@@ -1919,7 +1919,7 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DSetStrokeColor) {
}
CALLBACK_FUNC_DECL(CanvasRenderingContext2DSetFillColor) {
- INC_STATS(L"DOM.CanvasRenderingContext2D.steFillColor()");
+ INC_STATS("DOM.CanvasRenderingContext2D.steFillColor()");
CanvasRenderingContext2D* context =
V8Proxy::ToNativeObject<CanvasRenderingContext2D>(
V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
@@ -1960,7 +1960,7 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DSetFillColor) {
}
CALLBACK_FUNC_DECL(CanvasRenderingContext2DStrokeRect) {
- INC_STATS(L"DOM.CanvasRenderingContext2D.strokeRect()");
+ INC_STATS("DOM.CanvasRenderingContext2D.strokeRect()");
CanvasRenderingContext2D* context =
V8Proxy::ToNativeObject<CanvasRenderingContext2D>(
V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
@@ -1984,7 +1984,7 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DStrokeRect) {
}
CALLBACK_FUNC_DECL(CanvasRenderingContext2DSetShadow) {
- INC_STATS(L"DOM.CanvasRenderingContext2D.setShadow()");
+ INC_STATS("DOM.CanvasRenderingContext2D.setShadow()");
CanvasRenderingContext2D* context =
V8Proxy::ToNativeObject<CanvasRenderingContext2D>(
V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
@@ -2034,7 +2034,7 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DSetShadow) {
}
CALLBACK_FUNC_DECL(CanvasRenderingContext2DDrawImage) {
- INC_STATS(L"DOM.CanvasRenderingContext2D.drawImage()");
+ INC_STATS("DOM.CanvasRenderingContext2D.drawImage()");
CanvasRenderingContext2D* context =
V8Proxy::ToNativeObject<CanvasRenderingContext2D>(
V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
@@ -2119,7 +2119,7 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DDrawImage) {
}
CALLBACK_FUNC_DECL(CanvasRenderingContext2DDrawImageFromRect) {
- INC_STATS(L"DOM.CanvasRenderingContext2D.drawImageFromRect()");
+ INC_STATS("DOM.CanvasRenderingContext2D.drawImageFromRect()");
CanvasRenderingContext2D* context =
V8Proxy::ToNativeObject<CanvasRenderingContext2D>(
V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
@@ -2144,7 +2144,7 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DDrawImageFromRect) {
}
CALLBACK_FUNC_DECL(CanvasRenderingContext2DCreatePattern) {
- INC_STATS(L"DOM.CanvasRenderingContext2D.createPattern()");
+ INC_STATS("DOM.CanvasRenderingContext2D.createPattern()");
CanvasRenderingContext2D* context =
V8Proxy::ToNativeObject<CanvasRenderingContext2D>(
V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
@@ -2184,7 +2184,7 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DCreatePattern) {
}
CALLBACK_FUNC_DECL(CanvasRenderingContext2DFillText) {
- INC_STATS(L"DOM.CanvasRenderingContext2D.fillText()");
+ INC_STATS("DOM.CanvasRenderingContext2D.fillText()");
CanvasRenderingContext2D* context =
V8Proxy::ToNativeObject<CanvasRenderingContext2D>(
@@ -2213,7 +2213,7 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DFillText) {
}
CALLBACK_FUNC_DECL(CanvasRenderingContext2DStrokeText) {
- INC_STATS(L"DOM.CanvasRenderingContext2D.strokeText()");
+ INC_STATS("DOM.CanvasRenderingContext2D.strokeText()");
CanvasRenderingContext2D* context =
V8Proxy::ToNativeObject<CanvasRenderingContext2D>(
@@ -2242,7 +2242,7 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DStrokeText) {
}
CALLBACK_FUNC_DECL(CanvasRenderingContext2DPutImageData) {
- INC_STATS(L"DOM.CanvasRenderingContext2D.putImageData()");
+ INC_STATS("DOM.CanvasRenderingContext2D.putImageData()");
// Two froms:
// * putImageData(ImageData, x, y)
@@ -2289,31 +2289,31 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DPutImageData) {
// Console ---------------------------------------------------------------------
CALLBACK_FUNC_DECL(ConsoleAssert) {
- INC_STATS(L"DOM.Console.assert()");
+ INC_STATS("DOM.Console.assert()");
V8Proxy::SetDOMException(NOT_SUPPORTED_ERR);
return v8::Undefined();
}
CALLBACK_FUNC_DECL(ConsoleCount) {
- INC_STATS(L"DOM.Console.count()");
+ INC_STATS("DOM.Console.count()");
V8Proxy::SetDOMException(NOT_SUPPORTED_ERR);
return v8::Undefined();
}
CALLBACK_FUNC_DECL(ConsoleDebug) {
- INC_STATS(L"DOM.Console.debug()");
+ INC_STATS("DOM.Console.debug()");
V8Proxy::SetDOMException(NOT_SUPPORTED_ERR);
return v8::Undefined();
}
CALLBACK_FUNC_DECL(ConsoleDir) {
- INC_STATS(L"DOM.Console.dir()");
+ INC_STATS("DOM.Console.dir()");
V8Proxy::SetDOMException(NOT_SUPPORTED_ERR);
return v8::Undefined();
}
CALLBACK_FUNC_DECL(ConsoleError) {
- INC_STATS(L"DOM.Console.error()");
+ INC_STATS("DOM.Console.error()");
v8::Handle<v8::Value> holder = args.Holder();
Console* imp = V8Proxy::ToNativeObject<Console>(V8ClassIndex::CONSOLE, holder);
ScriptCallContext context(args);
@@ -2322,7 +2322,7 @@ CALLBACK_FUNC_DECL(ConsoleError) {
}
CALLBACK_FUNC_DECL(ConsoleGroup) {
- INC_STATS(L"DOM.Console.group()");
+ INC_STATS("DOM.Console.group()");
v8::Handle<v8::Value> holder = args.Holder();
Console* imp = V8Proxy::ToNativeObject<Console>(V8ClassIndex::CONSOLE, holder);
ScriptCallContext context(args);
@@ -2331,7 +2331,7 @@ CALLBACK_FUNC_DECL(ConsoleGroup) {
}
CALLBACK_FUNC_DECL(ConsoleInfo) {
- INC_STATS(L"DOM.Console.info()");
+ INC_STATS("DOM.Console.info()");
v8::Handle<v8::Value> holder = args.Holder();
Console* imp = V8Proxy::ToNativeObject<Console>(V8ClassIndex::CONSOLE, holder);
ScriptCallContext context(args);
@@ -2340,7 +2340,7 @@ CALLBACK_FUNC_DECL(ConsoleInfo) {
}
CALLBACK_FUNC_DECL(ConsoleLog) {
- INC_STATS(L"DOM.Console.log()");
+ INC_STATS("DOM.Console.log()");
v8::Handle<v8::Value> holder = args.Holder();
Console* imp = V8Proxy::ToNativeObject<Console>(V8ClassIndex::CONSOLE, holder);
ScriptCallContext context(args);
@@ -2349,25 +2349,25 @@ CALLBACK_FUNC_DECL(ConsoleLog) {
}
CALLBACK_FUNC_DECL(ConsoleProfile) {
- INC_STATS(L"DOM.Console.profile()");
+ INC_STATS("DOM.Console.profile()");
V8Proxy::SetDOMException(NOT_SUPPORTED_ERR);
return v8::Undefined();
}
CALLBACK_FUNC_DECL(ConsoleProfileEnd) {
- INC_STATS(L"DOM.Console.profileEnd()");
+ INC_STATS("DOM.Console.profileEnd()");
V8Proxy::SetDOMException(NOT_SUPPORTED_ERR);
return v8::Undefined();
}
CALLBACK_FUNC_DECL(ConsoleTimeEnd) {
- INC_STATS(L"DOM.Console.timeEnd()");
+ INC_STATS("DOM.Console.timeEnd()");
V8Proxy::SetDOMException(NOT_SUPPORTED_ERR);
return v8::Undefined();
}
CALLBACK_FUNC_DECL(ConsoleWarn) {
- INC_STATS(L"DOM.Console.warn()");
+ INC_STATS("DOM.Console.warn()");
v8::Handle<v8::Value> holder = args.Holder();
Console* imp = V8Proxy::ToNativeObject<Console>(V8ClassIndex::CONSOLE, holder);
ScriptCallContext context(args);
@@ -2376,13 +2376,13 @@ CALLBACK_FUNC_DECL(ConsoleWarn) {
}
CALLBACK_FUNC_DECL(ConsoleDirxml) {
- INC_STATS(L"DOM.Console.dirxml()");
+ INC_STATS("DOM.Console.dirxml()");
V8Proxy::SetDOMException(NOT_SUPPORTED_ERR);
return v8::Undefined();
}
CALLBACK_FUNC_DECL(ConsoleTrace) {
- INC_STATS(L"DOM.Console.trace()");
+ INC_STATS("DOM.Console.trace()");
V8Proxy::SetDOMException(NOT_SUPPORTED_ERR);
return v8::Undefined();
}
@@ -2392,7 +2392,7 @@ CALLBACK_FUNC_DECL(ConsoleTrace) {
ACCESSOR_GETTER(ClipboardTypes) {
- INC_STATS(L"DOM.Clipboard.types()");
+ INC_STATS("DOM.Clipboard.types()");
Clipboard* imp =
V8Proxy::ToNativeObject<Clipboard>(V8ClassIndex::CLIPBOARD,
info.Holder());
@@ -2414,7 +2414,7 @@ ACCESSOR_GETTER(ClipboardTypes) {
CALLBACK_FUNC_DECL(ClipboardClearData) {
- INC_STATS(L"DOM.Clipboard.clearData()");
+ INC_STATS("DOM.Clipboard.clearData()");
Clipboard* imp = V8Proxy::ToNativeObject<Clipboard>(
V8ClassIndex::CLIPBOARD, args.Holder());
@@ -2436,7 +2436,7 @@ CALLBACK_FUNC_DECL(ClipboardClearData) {
CALLBACK_FUNC_DECL(ClipboardGetData) {
- INC_STATS(L"DOM.Clipboard.getData()");
+ INC_STATS("DOM.Clipboard.getData()");
Clipboard* imp = V8Proxy::ToNativeObject<Clipboard>(
V8ClassIndex::CLIPBOARD, args.Holder());
@@ -2454,7 +2454,7 @@ CALLBACK_FUNC_DECL(ClipboardGetData) {
}
CALLBACK_FUNC_DECL(ClipboardSetData) {
- INC_STATS(L"DOM.Clipboard.setData()");
+ INC_STATS("DOM.Clipboard.setData()");
Clipboard* imp = V8Proxy::ToNativeObject<Clipboard>(
V8ClassIndex::CLIPBOARD, args.Holder());
@@ -2472,7 +2472,7 @@ CALLBACK_FUNC_DECL(ClipboardSetData) {
CALLBACK_FUNC_DECL(ClipboardSetDragImage) {
- INC_STATS(L"DOM.Clipboard.setDragImage()");
+ INC_STATS("DOM.Clipboard.setDragImage()");
Clipboard* imp = V8Proxy::ToNativeObject<Clipboard>(
V8ClassIndex::CLIPBOARD, args.Holder());
@@ -2552,7 +2552,7 @@ static bool AllowSettingFrameSrcToJavascriptUrl(HTMLFrameElementBase* frame,
// Element ---------------------------------------------------------------------
CALLBACK_FUNC_DECL(ElementSetAttribute) {
- INC_STATS(L"DOM.Element.setAttribute()");
+ INC_STATS("DOM.Element.setAttribute()");
Element* imp = V8Proxy::DOMWrapperToNode<Element>(args.Holder());
ExceptionCode ec = 0;
String name = ToWebCoreString(args[0]);
@@ -2571,7 +2571,7 @@ CALLBACK_FUNC_DECL(ElementSetAttribute) {
}
CALLBACK_FUNC_DECL(ElementSetAttributeNode) {
- INC_STATS(L"DOM.Element.setAttributeNode()");
+ INC_STATS("DOM.Element.setAttributeNode()");
if (!V8Attr::HasInstance(args[0])) {
V8Proxy::SetDOMException(TYPE_MISMATCH_ERR);
return v8::Handle<v8::Value>();
@@ -2594,7 +2594,7 @@ CALLBACK_FUNC_DECL(ElementSetAttributeNode) {
}
CALLBACK_FUNC_DECL(ElementSetAttributeNS) {
- INC_STATS(L"DOM.Element.setAttributeNS()");
+ INC_STATS("DOM.Element.setAttributeNS()");
Element* imp = V8Proxy::DOMWrapperToNode<Element>(args.Holder());
ExceptionCode ec = 0;
String namespaceURI = valueToStringWithNullCheck(args[0]);
@@ -2614,7 +2614,7 @@ CALLBACK_FUNC_DECL(ElementSetAttributeNS) {
}
CALLBACK_FUNC_DECL(ElementSetAttributeNodeNS) {
- INC_STATS(L"DOM.Element.setAttributeNodeNS()");
+ INC_STATS("DOM.Element.setAttributeNodeNS()");
if (!V8Attr::HasInstance(args[0])) {
V8Proxy::SetDOMException(TYPE_MISMATCH_ERR);
return v8::Handle<v8::Value>();
@@ -2754,13 +2754,13 @@ v8::Handle<v8::Value> V8Custom::WindowSetTimeoutImpl(const v8::Arguments& args,
CALLBACK_FUNC_DECL(DOMWindowSetTimeout) {
- INC_STATS(L"DOM.DOMWindow.setTimeout()");
+ INC_STATS("DOM.DOMWindow.setTimeout()");
return WindowSetTimeoutImpl(args, true);
}
CALLBACK_FUNC_DECL(DOMWindowSetInterval) {
- INC_STATS(L"DOM.DOMWindow.setInterval()");
+ INC_STATS("DOM.DOMWindow.setInterval()");
return WindowSetTimeoutImpl(args, false);
}
@@ -2780,7 +2780,7 @@ static String WriteHelper_GetString(const v8::Arguments& args) {
}
CALLBACK_FUNC_DECL(HTMLDocumentWrite) {
- INC_STATS(L"DOM.HTMLDocument.write()");
+ INC_STATS("DOM.HTMLDocument.write()");
HTMLDocument* imp = V8Proxy::DOMWrapperToNode<HTMLDocument>(args.Holder());
Frame* frame = V8Proxy::retrieveActiveFrame();
ASSERT(frame);
@@ -2789,7 +2789,7 @@ CALLBACK_FUNC_DECL(HTMLDocumentWrite) {
}
CALLBACK_FUNC_DECL(HTMLDocumentWriteln) {
- INC_STATS(L"DOM.HTMLDocument.writeln()");
+ INC_STATS("DOM.HTMLDocument.writeln()");
HTMLDocument* imp = V8Proxy::DOMWrapperToNode<HTMLDocument>(args.Holder());
Frame* frame = V8Proxy::retrieveActiveFrame();
ASSERT(frame);
@@ -2798,7 +2798,7 @@ CALLBACK_FUNC_DECL(HTMLDocumentWriteln) {
}
CALLBACK_FUNC_DECL(HTMLDocumentOpen) {
- INC_STATS(L"DOM.HTMLDocument.open()");
+ INC_STATS("DOM.HTMLDocument.open()");
HTMLDocument* imp = V8Proxy::DOMWrapperToNode<HTMLDocument>(args.Holder());
if (args.Length() > 2) {
@@ -2840,7 +2840,7 @@ CALLBACK_FUNC_DECL(HTMLDocumentOpen) {
// Document --------------------------------------------------------------------
CALLBACK_FUNC_DECL(DocumentEvaluate) {
- INC_STATS(L"DOM.Document.evaluate()");
+ INC_STATS("DOM.Document.evaluate()");
Document* imp = V8Proxy::DOMWrapperToNode<Document>(args.Holder());
ExceptionCode ec = 0;
@@ -2915,7 +2915,7 @@ static v8::Handle<v8::Value> Base64Convert(const String& str, bool encode) {
}
CALLBACK_FUNC_DECL(DOMWindowAtob) {
- INC_STATS(L"DOM.DOMWindow.atob()");
+ INC_STATS("DOM.DOMWindow.atob()");
DOMWindow* imp = V8Proxy::ToNativeObject<DOMWindow>(
V8ClassIndex::DOMWINDOW, args.Holder());
@@ -2934,7 +2934,7 @@ CALLBACK_FUNC_DECL(DOMWindowAtob) {
}
CALLBACK_FUNC_DECL(DOMWindowBtoa) {
- INC_STATS(L"DOM.DOMWindow.btoa()");
+ INC_STATS("DOM.DOMWindow.btoa()");
DOMWindow* imp = V8Proxy::ToNativeObject<DOMWindow>(
V8ClassIndex::DOMWINDOW, args.Holder());
@@ -2958,13 +2958,13 @@ CALLBACK_FUNC_DECL(DOMWindowBtoa) {
// switching context of receiver. I consider it is dangerous.
CALLBACK_FUNC_DECL(DOMWindowToString)
{
- INC_STATS(L"DOM.DOMWindow.toString()");
+ INC_STATS("DOM.DOMWindow.toString()");
return args.This()->ObjectProtoToString();
}
CALLBACK_FUNC_DECL(DOMWindowNOP)
{
- INC_STATS(L"DOM.DOMWindow.nop()");
+ INC_STATS("DOM.DOMWindow.nop()");
return v8::Undefined();
}
@@ -2972,7 +2972,7 @@ CALLBACK_FUNC_DECL(DOMWindowNOP)
// EventTargetNode -------------------------------------------------------------
CALLBACK_FUNC_DECL(EventTargetNodeAddEventListener) {
- INC_STATS(L"DOM.EventTargetNode.addEventListener()");
+ INC_STATS("DOM.EventTargetNode.addEventListener()");
EventTargetNode* node =
V8Proxy::DOMWrapperToNode<EventTargetNode>(args.Holder());
@@ -2991,7 +2991,7 @@ CALLBACK_FUNC_DECL(EventTargetNodeAddEventListener) {
}
CALLBACK_FUNC_DECL(EventTargetNodeRemoveEventListener) {
- INC_STATS(L"DOM.EventTargetNode.removeEventListener()");
+ INC_STATS("DOM.EventTargetNode.removeEventListener()");
EventTargetNode* node =
V8Proxy::DOMWrapperToNode<EventTargetNode>(args.Holder());
@@ -3016,7 +3016,7 @@ CALLBACK_FUNC_DECL(EventTargetNodeRemoveEventListener) {
// Navigator ------------------------------------------------------------------
ACCESSOR_GETTER(NavigatorAppVersion) {
- INC_STATS(L"DOM.Navigator.appVersion");
+ INC_STATS("DOM.Navigator.appVersion");
v8::Handle<v8::Object> holder = info.Holder();
Navigator* imp = V8Proxy::ToNativeObject<Navigator>(V8ClassIndex::NAVIGATOR,
holder);
@@ -3028,7 +3028,7 @@ ACCESSOR_GETTER(NavigatorAppVersion) {
// TreeWalker ------------------------------------------------------------------
CALLBACK_FUNC_DECL(TreeWalkerParentNode) {
- INC_STATS(L"DOM.TreeWalker.parentNode()");
+ INC_STATS("DOM.TreeWalker.parentNode()");
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
@@ -3043,7 +3043,7 @@ CALLBACK_FUNC_DECL(TreeWalkerParentNode) {
}
CALLBACK_FUNC_DECL(TreeWalkerFirstChild) {
- INC_STATS(L"DOM.TreeWalker.firstChild()");
+ INC_STATS("DOM.TreeWalker.firstChild()");
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
@@ -3058,7 +3058,7 @@ CALLBACK_FUNC_DECL(TreeWalkerFirstChild) {
}
CALLBACK_FUNC_DECL(TreeWalkerLastChild) {
- INC_STATS(L"DOM.TreeWalker.lastChild()");
+ INC_STATS("DOM.TreeWalker.lastChild()");
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
@@ -3073,7 +3073,7 @@ CALLBACK_FUNC_DECL(TreeWalkerLastChild) {
}
CALLBACK_FUNC_DECL(TreeWalkerNextNode) {
- INC_STATS(L"DOM.TreeWalker.nextNode()");
+ INC_STATS("DOM.TreeWalker.nextNode()");
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
@@ -3088,7 +3088,7 @@ CALLBACK_FUNC_DECL(TreeWalkerNextNode) {
}
CALLBACK_FUNC_DECL(TreeWalkerPreviousNode) {
- INC_STATS(L"DOM.TreeWalker.previousNode()");
+ INC_STATS("DOM.TreeWalker.previousNode()");
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
@@ -3103,7 +3103,7 @@ CALLBACK_FUNC_DECL(TreeWalkerPreviousNode) {
}
CALLBACK_FUNC_DECL(TreeWalkerNextSibling) {
- INC_STATS(L"DOM.TreeWalker.nextSibling()");
+ INC_STATS("DOM.TreeWalker.nextSibling()");
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
@@ -3118,7 +3118,7 @@ CALLBACK_FUNC_DECL(TreeWalkerNextSibling) {
}
CALLBACK_FUNC_DECL(TreeWalkerPreviousSibling) {
- INC_STATS(L"DOM.TreeWalker.previousSibling()");
+ INC_STATS("DOM.TreeWalker.previousSibling()");
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
@@ -3133,7 +3133,7 @@ CALLBACK_FUNC_DECL(TreeWalkerPreviousSibling) {
}
CALLBACK_FUNC_DECL(NodeIteratorNextNode) {
- INC_STATS(L"DOM.NodeIterator.nextNode()");
+ INC_STATS("DOM.NodeIterator.nextNode()");
NodeIterator* nodeIterator = V8Proxy::ToNativeObject<NodeIterator>(
V8ClassIndex::NODEITERATOR, args.Holder());
@@ -3153,7 +3153,7 @@ CALLBACK_FUNC_DECL(NodeIteratorNextNode) {
}
CALLBACK_FUNC_DECL(NodeIteratorPreviousNode) {
- INC_STATS(L"DOM.NodeIterator.previousNode()");
+ INC_STATS("DOM.NodeIterator.previousNode()");
NodeIterator* nodeIterator = V8Proxy::ToNativeObject<NodeIterator>(
V8ClassIndex::NODEITERATOR, args.Holder());
@@ -3173,7 +3173,7 @@ CALLBACK_FUNC_DECL(NodeIteratorPreviousNode) {
}
CALLBACK_FUNC_DECL(NodeFilterAcceptNode) {
- INC_STATS(L"DOM.NodeFilter.acceptNode()");
+ INC_STATS("DOM.NodeFilter.acceptNode()");
V8Proxy::SetDOMException(NOT_SUPPORTED_ERR);
return v8::Undefined();
}
@@ -3328,7 +3328,7 @@ ACCESSOR_SETTER(HTMLOptionsCollectionLength) {
}
ACCESSOR_GETTER(HTMLInputElementSelectionStart) {
- INC_STATS(L"DOM.HTMLInputElement.selectionStart._get");
+ INC_STATS("DOM.HTMLInputElement.selectionStart._get");
v8::Handle<v8::Object> holder = info.Holder();
HTMLInputElement* imp = V8Proxy::DOMWrapperToNode<HTMLInputElement>(holder);
@@ -3340,7 +3340,7 @@ ACCESSOR_GETTER(HTMLInputElementSelectionStart) {
}
ACCESSOR_GETTER(HTMLInputElementSelectionEnd) {
- INC_STATS(L"DOM.HTMLInputElement.selectionEnd._get");
+ INC_STATS("DOM.HTMLInputElement.selectionEnd._get");
v8::Handle<v8::Object> holder = info.Holder();
HTMLInputElement* imp = V8Proxy::DOMWrapperToNode<HTMLInputElement>(holder);
@@ -3354,14 +3354,14 @@ ACCESSOR_GETTER(HTMLInputElementSelectionEnd) {
#if ENABLE(SVG)
ACCESSOR_GETTER(SVGLengthValue) {
- INC_STATS(L"DOM.SVGLength.value");
+ INC_STATS("DOM.SVGLength.value");
V8SVGPODTypeWrapper<SVGLength>* wrapper = V8Proxy::ToNativeObject<V8SVGPODTypeWrapper<SVGLength> >(V8ClassIndex::SVGLENGTH, info.Holder());
SVGLength imp = *wrapper;
return v8::Number::New(imp.value(V8Proxy::GetSVGContext(wrapper)));
}
CALLBACK_FUNC_DECL(SVGLengthConvertToSpecifiedUnits) {
- INC_STATS(L"DOM.SVGLength.convertToSpecifiedUnits");
+ INC_STATS("DOM.SVGLength.convertToSpecifiedUnits");
V8SVGPODTypeWrapper<SVGLength>* wrapper = V8Proxy::ToNativeObject<V8SVGPODTypeWrapper<SVGLength> >(V8ClassIndex::SVGLENGTH, args.Holder());
SVGLength imp = *wrapper;
SVGElement* context = V8Proxy::GetSVGContext(wrapper);
@@ -3371,7 +3371,7 @@ CALLBACK_FUNC_DECL(SVGLengthConvertToSpecifiedUnits) {
}
CALLBACK_FUNC_DECL(SVGMatrixInverse) {
- INC_STATS(L"DOM.SVGMatrix.inverse()");
+ INC_STATS("DOM.SVGMatrix.inverse()");
AffineTransform imp =
*V8Proxy::ToNativeObject<V8SVGPODTypeWrapper<AffineTransform> >(
V8ClassIndex::SVGMATRIX, args.Holder());
@@ -3391,7 +3391,7 @@ CALLBACK_FUNC_DECL(SVGMatrixInverse) {
}
CALLBACK_FUNC_DECL(SVGMatrixRotateFromVector) {
- INC_STATS(L"DOM.SVGMatrix.rotateFromVector()");
+ INC_STATS("DOM.SVGMatrix.rotateFromVector()");
AffineTransform imp =
*V8Proxy::ToNativeObject<V8SVGPODTypeWrapper<AffineTransform> >(
V8ClassIndex::SVGMATRIX, args.Holder());
@@ -3414,7 +3414,7 @@ CALLBACK_FUNC_DECL(SVGMatrixRotateFromVector) {
}
CALLBACK_FUNC_DECL(SVGElementInstanceAddEventListener) {
- INC_STATS(L"DOM.SVGElementInstance.AddEventListener()");
+ INC_STATS("DOM.SVGElementInstance.AddEventListener()");
SVGElementInstance* instance =
V8Proxy::DOMWrapperToNative<SVGElementInstance>(args.Holder());
@@ -3433,7 +3433,7 @@ CALLBACK_FUNC_DECL(SVGElementInstanceAddEventListener) {
}
CALLBACK_FUNC_DECL(SVGElementInstanceRemoveEventListener) {
- INC_STATS(L"DOM.SVGElementInstance.RemoveEventListener()");
+ INC_STATS("DOM.SVGElementInstance.RemoveEventListener()");
SVGElementInstance* instance =
V8Proxy::DOMWrapperToNative<SVGElementInstance>(args.Holder());
diff --git a/webkit/port/platform/chromium/ChromiumBridge.h b/webkit/port/platform/chromium/ChromiumBridge.h
index 69c3b33..cde6508 100644
--- a/webkit/port/platform/chromium/ChromiumBridge.h
+++ b/webkit/port/platform/chromium/ChromiumBridge.h
@@ -122,9 +122,8 @@ namespace WebCore {
static void stopSharedTimer();
// StatsCounters ------------------------------------------------------
- // TODO(erikkay): WebKit doesn't use wchar_t - change to use UTF8
- static void decrementStatsCounter(const wchar_t* name);
- static void incrementStatsCounter(const wchar_t* name);
+ static void decrementStatsCounter(const char* name);
+ static void incrementStatsCounter(const char* name);
static void initV8CounterFunction();
// SystemTime ----------------------------------------------------------
diff --git a/webkit/tools/test_shell/mac/main.mm b/webkit/tools/test_shell/mac/main.mm
index a3dbeb8..9dd39be 100644
--- a/webkit/tools/test_shell/mac/main.mm
+++ b/webkit/tools/test_shell/mac/main.mm
@@ -27,7 +27,7 @@
static char g_currentTestName[PATH_MAX];
-static const wchar_t* kStatsFile = L"testshell";
+static const char* kStatsFile = "testshell";
static int kStatsFileThreads = 20;
static int kStatsFileCounters = 100;
@@ -164,8 +164,8 @@ int main(const int argc, const char *argv[]) {
// Load and initialize the stats table (one per process, so that multiple
// instances don't interfere with each other)
- wchar_t statsfile[64];
- swprintf(statsfile, 64, L"%ls-%d", kStatsFile, getpid());
+ char statsfile[64];
+ snprintf(statsfile, 64, "%s-%d", kStatsFile, getpid());
StatsTable *table =
new StatsTable(statsfile, kStatsFileThreads, kStatsFileCounters);
StatsTable::set_current(table);
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index ed88267..523bd83 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -138,10 +138,10 @@ TestShell::~TestShell() {
if (table != NULL) {
int counter_max = table->GetMaxCounters();
for (int index=0; index < counter_max; index++) {
- std::wstring name(table->GetRowName(index));
+ std::string name(table->GetRowName(index));
if (name.length() > 0) {
int value = table->GetRowValue(index);
- printf("%s:\t%d\n", WideToUTF8(name).c_str(), value);
+ printf("%s:\t%d\n", name.c_str(), value);
}
}
}
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc
index 91a9567..9d619ef 100644
--- a/webkit/tools/test_shell/test_shell_main.cc
+++ b/webkit/tools/test_shell/test_shell_main.cc
@@ -54,7 +54,7 @@ static const size_t kPathBufSize = 2048;
namespace {
// StatsTable initialization parameters.
-static const wchar_t* kStatsFilePrefix = L"testshell_";
+static const char* kStatsFilePrefix = "testshell_";
static int kStatsFileThreads = 20;
static int kStatsFileCounters = 200;
@@ -233,7 +233,7 @@ int main(int argc, char* argv[]) {
// Load and initialize the stats table. Attempt to construct a somewhat
// unique name to isolate separate instances from each other.
StatsTable *table = new StatsTable(
- kStatsFilePrefix + Uint64ToWString(base::RandUint64()),
+ kStatsFilePrefix + Uint64ToString(base::RandUint64()),
kStatsFileThreads,
kStatsFileCounters);
StatsTable::set_current(table);