aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/MozillaPrivate.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/embed/mozilla/MozillaPrivate.cpp b/embed/mozilla/MozillaPrivate.cpp
index 74afc615e..58789dca4 100644
--- a/embed/mozilla/MozillaPrivate.cpp
+++ b/embed/mozilla/MozillaPrivate.cpp
@@ -25,6 +25,7 @@
#include <nsIServiceManager.h>
#include <nsISimpleEnumerator.h>
#include <nsISupportsPrimitives.h>
+#include <nsPromiseFlatString.h>
/* IMPORTANT. Put only code that use internal mozilla strings (nsAutoString for
* example) in this file. Note that you cannot use embed strings here,
@@ -65,8 +66,8 @@ MozillaPrivate::GetPrinterList ()
rv = printer->GetData(data);
NS_ENSURE_SUCCESS(rv, nsnull);
- const char *name = NS_ConvertUCS2toUTF8 (data).get();
- printers = g_list_prepend (printers, g_strdup (name));
+ const nsACString& cData = NS_ConvertUCS2toUTF8 (data);
+ printers = g_list_prepend (printers, g_strdup (PromiseFlatCString (cData).get()));
}
return g_list_reverse (printers);