Bug 505729 - nsXPConnect.cpp fails to build on MinGW. r=bz
authorJacek Caban <jacek@codeweavers.com>
Sun, 09 Aug 2009 16:45:00 +0200
changeset 31272 456a088b297bd46784990cc7ea0277b81b1cafd0
parent 31271 05d7e81676bd0f675139a7ca79df451f391311df
child 31273 dc7ac5fba28d1486a65910017e120ca6ad6b66d8
push id8466
push userdgottwald@mozilla.com
push dateSun, 09 Aug 2009 14:45:21 +0000
treeherdermozilla-central@456a088b297b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs505729
milestone1.9.2a2pre
Bug 505729 - nsXPConnect.cpp fails to build on MinGW. r=bz
js/src/xpconnect/src/nsXPConnect.cpp
--- a/js/src/xpconnect/src/nsXPConnect.cpp
+++ b/js/src/xpconnect/src/nsXPConnect.cpp
@@ -841,17 +841,17 @@ nsXPConnect::Traverse(void *p, nsCycleCo
                 }
                 else if(clazz == &js_FunctionClass)
                 {
                     JSFunction* fun = (JSFunction*) xpc_GetJSPrivate(obj);
                     JSString* str = JS_GetFunctionId(fun);
                     if(str)
                     {
                         NS_ConvertUTF16toUTF8
-                            fname(JS_GetStringChars(str));
+                            fname(reinterpret_cast<const PRUnichar*>(JS_GetStringChars(str)));
                         JS_snprintf(name, sizeof(name),
                                     "JS Object (Function - %s)", fname.get());
                     }
                     else
                     {
                         JS_snprintf(name, sizeof(name), "JS Object (Function)");
                     }
                 }