PRUnichar* val = aValue.ToNewUnicode(); supportsStr->SetData(val); nsMemory::Free(val);
supportsStr->SetData(nsPromiseFlatString(aValue));
nsPresState::SetStateProperty(const nsString& aName, const nsString& aValue){  if (!mPropertyTable)    mPropertyTable = new nsSupportsHashtable(8);  // Add to hashtable  nsStringKey key(aName);  nsCOMPtr<nsISupportsWString> supportsStr;  nsresult rv = nsComponentManager::CreateInstance(NS_SUPPORTS_WSTRING_PROGID, nsnull,                                                     NS_GET_IID(nsISupportsWString), getter_AddRefs(supportsStr));  PRUnichar* val = aValue.ToNewUnicode();  supportsStr->SetData(val);  nsMemory::Free(val);  mPropertyTable->Put(&key, supportsStr);  return NS_OK;}