case nsIDataType::TYPE_ASTRING:
case nsIDataType::VTYPE_ASTRING:
static PRBool String2ID(const nsDiscriminatedUnion& data, nsID* pid){    nsAutoString tempString;    nsAString* pString;    switch(data.mType)    {        case nsIDataType::TYPE_CHAR_STR:        case nsIDataType::TYPE_STRING_SIZE_IS:            return pid->Parse(data.str.mStringValue);        case nsIDataType::TYPE_ASTRING:            pString = data.mAStringValue;            break;        case nsIDataType::TYPE_WCHAR_STR:        case nsIDataType::TYPE_WSTRING_SIZE_IS:            tempString.Assign(data.wstr.mWStringValue);            pString = &tempString;            break;        default:            NS_ERROR("bad type in call to String2ID");            return PR_FALSE;    }        char* pChars = ToNewCString(*pString);    if(!pChars)        return PR_FALSE;    PRBool result = pid->Parse(pChars);    nsMemory::Free(pChars);    return result;}