From 7f71d9ecd827c4476891e099633f789001cccf7b Mon Sep 17 00:00:00 2001 From: "neil%parkwaycc.co.uk" Date: Mon, 17 Nov 2003 19:26:24 +0000 Subject: [PATCH] Bug 225952 nsObjectFrame.cpp abuses nsXPIDLCString r/sr=bz git-svn-id: svn://10.0.0.236/trunk@149446 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsObjectFrame.cpp | 4 +--- mozilla/layout/html/base/src/nsObjectFrame.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp index 0f14f1567ba..1e756e2621a 100644 --- a/mozilla/layout/generic/nsObjectFrame.cpp +++ b/mozilla/layout/generic/nsObjectFrame.cpp @@ -1166,11 +1166,9 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext, if (mimeType || !src.IsEmpty()) { if (!mimeType) { // we don't have a mime type, try to figure it out from extension - nsXPIDLCString extension; PRInt32 offset = src.RFindChar(PRUnichar('.')); if (offset != kNotFound) - *getter_Copies(extension) = ToNewCString(Substring(src, offset+1, src.Length())); - pluginHost->IsPluginEnabledForExtension(extension, mimeType); + pluginHost->IsPluginEnabledForExtension(NS_ConvertUTF16toUTF8(Substring(src, offset + 1, src.Length())).get(), mimeType); } // if we fail to get a mime type from extension we can still try to // instantiate plugin as it can be possible to determine it later diff --git a/mozilla/layout/html/base/src/nsObjectFrame.cpp b/mozilla/layout/html/base/src/nsObjectFrame.cpp index 0f14f1567ba..1e756e2621a 100644 --- a/mozilla/layout/html/base/src/nsObjectFrame.cpp +++ b/mozilla/layout/html/base/src/nsObjectFrame.cpp @@ -1166,11 +1166,9 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext, if (mimeType || !src.IsEmpty()) { if (!mimeType) { // we don't have a mime type, try to figure it out from extension - nsXPIDLCString extension; PRInt32 offset = src.RFindChar(PRUnichar('.')); if (offset != kNotFound) - *getter_Copies(extension) = ToNewCString(Substring(src, offset+1, src.Length())); - pluginHost->IsPluginEnabledForExtension(extension, mimeType); + pluginHost->IsPluginEnabledForExtension(NS_ConvertUTF16toUTF8(Substring(src, offset + 1, src.Length())).get(), mimeType); } // if we fail to get a mime type from extension we can still try to // instantiate plugin as it can be possible to determine it later