Make XOW's toString consistent over all cases. bug 398109, r=jst sr=bzbarsky a=beltzner
git-svn-id: svn://10.0.0.236/trunk@240011 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -637,8 +637,6 @@ XPCWrapper::NativeToString(JSContext *cx, XPCWrappedNative *wrappedNative,
|
||||
return JS_FALSE;
|
||||
}
|
||||
} else {
|
||||
resultString.AppendLiteral("[object XPCCrossOriginWrapper ");
|
||||
|
||||
wrapperStr = wrappedNative->ToString(ccx);
|
||||
if (!wrapperStr) {
|
||||
return JS_FALSE;
|
||||
@@ -648,7 +646,9 @@ XPCWrapper::NativeToString(JSContext *cx, XPCWrappedNative *wrappedNative,
|
||||
resultString.AppendASCII(wrapperStr);
|
||||
JS_smprintf_free(wrapperStr);
|
||||
|
||||
resultString.Append(']');
|
||||
if (isNativeWrapper) {
|
||||
resultString.Append(']');
|
||||
}
|
||||
|
||||
str = ::JS_NewUCStringCopyN(cx, reinterpret_cast<const jschar *>
|
||||
(resultString.get()),
|
||||
|
||||
Reference in New Issue
Block a user