diff --git a/mozilla/content/html/style/src/nsCSSScanner.cpp b/mozilla/content/html/style/src/nsCSSScanner.cpp
index cd2855e274f..1eb0ec19c3c 100644
--- a/mozilla/content/html/style/src/nsCSSScanner.cpp
+++ b/mozilla/content/html/style/src/nsCSSScanner.cpp
@@ -204,7 +204,7 @@ void nsCSSScanner::Init(nsIUnicharInputStream* aInput, nsIURI* aURI)
if (aURI) {
aURI->GetSpec(getter_Copies(mFileName));
} else {
- mFileName = "from DOM";
+ mFileName.Adopt(nsCRT::strdup("from DOM"));
}
mColNumber = 0;
#endif // CSS_REPORT_PARSE_ERRORS
diff --git a/mozilla/layout/style/nsCSSScanner.cpp b/mozilla/layout/style/nsCSSScanner.cpp
index cd2855e274f..1eb0ec19c3c 100644
--- a/mozilla/layout/style/nsCSSScanner.cpp
+++ b/mozilla/layout/style/nsCSSScanner.cpp
@@ -204,7 +204,7 @@ void nsCSSScanner::Init(nsIUnicharInputStream* aInput, nsIURI* aURI)
if (aURI) {
aURI->GetSpec(getter_Copies(mFileName));
} else {
- mFileName = "from DOM";
+ mFileName.Adopt(nsCRT::strdup("from DOM"));
}
mColNumber = 0;
#endif // CSS_REPORT_PARSE_ERRORS