Bug 575653 - [e10s] string assignment to LossyCopyUTF16toASCII in nsHTMLCanvasElement r=bzbarsky, a=approval2.0

This commit is contained in:
Mike Kristoffersen 2010-11-03 14:08:37 +01:00
parent 9df583f18e
commit f84052b728

View File

@ -373,8 +373,7 @@ nsHTMLCanvasElement::GetContextHelper(const nsAString& aContextId,
{
NS_ENSURE_ARG(aContext);
nsCString ctxId;
ctxId.Assign(NS_LossyConvertUTF16toASCII(aContextId));
NS_LossyConvertUTF16toASCII ctxId(aContextId);
// check that ctxId is clamped to A-Za-z0-9_-
for (PRUint32 i = 0; i < ctxId.Length(); i++) {