Bug 390042 - mingw build error - error: no matching function for call to nsAutoString::nsAutoString(jschar*), r=mrbkap, sr=jst, a=jst
authormartijn.martijn@gmail.com
Fri, 03 Aug 2007 03:15:36 -0700
changeset 4231 08592422bbfbce33c69a53c8a17b210d9d119095
parent 4230 4737bd1f38e7a7101ae6ccb89f33b15621ca2ed0
child 4232 0eb45e65f6a7c1a791101db43fce6ffe951b0959
push idunknown
push userunknown
push dateunknown
reviewersmrbkap, jst, jst
bugs390042
milestone1.9a7pre
Bug 390042 - mingw build error - error: no matching function for call to nsAutoString::nsAutoString(jschar*), r=mrbkap, sr=jst, a=jst
js/src/xpconnect/src/XPCCrossOriginWrapper.cpp
--- a/js/src/xpconnect/src/XPCCrossOriginWrapper.cpp
+++ b/js/src/xpconnect/src/XPCCrossOriginWrapper.cpp
@@ -200,17 +200,18 @@ IsValFrame(JSContext *cx, JSObject *obj,
   domwin->GetFrames(getter_AddRefs(col));
   if (!col) {
     return JS_FALSE;
   }
 
   if (JSVAL_IS_INT(v)) {
     col->Item(JSVAL_TO_INT(v), getter_AddRefs(domwin));
   } else {
-    nsAutoString str(JS_GetStringChars(JSVAL_TO_STRING(v)));
+    nsAutoString str(reinterpret_cast<PRUnichar *>
+                                     (JS_GetStringChars(JSVAL_TO_STRING(v))));
     col->NamedItem(str, getter_AddRefs(domwin));
   }
 
   return domwin != nsnull;
 }
 
 // Returns whether the currently executing code has the same origin as the
 // wrapper. Uses nsIScriptSecurityManager::CheckSameOriginPrincipal.