void Icc::GetCardState(nsString& aCardState) const { aCardState.SetIsVoid(true); if (!mProvider) { return; } nsresult rv = mProvider->GetCardState(mClientId, aCardState); if (NS_FAILED(rv)) { aCardState.SetIsVoid(true); } }
/* static */ void nsPerformanceSnapshot::GetWindowData(JSContext* cx, nsString& title, uint64_t* windowId) { MOZ_ASSERT(windowId); title.SetIsVoid(true); *windowId = 0; nsCOMPtr<nsPIDOMWindow> win = xpc::CurrentWindowOrNull(cx); if (!win) { return; } nsCOMPtr<nsIDOMWindow> top; nsresult rv = win->GetTop(getter_AddRefs(top)); if (!top || NS_FAILED(rv)) { return; } nsCOMPtr<nsPIDOMWindow> ptop = do_QueryInterface(top); if (!ptop) { return; } nsCOMPtr<nsIDocument> doc = ptop->GetExtantDoc(); if (!doc) { return; } doc->GetTitle(title); *windowId = ptop->WindowID(); }
void AndroidGeckoEvent::ReadStringFromJString(nsString &aString, JNIEnv *jenv, jstring s) { if (!s) { aString.SetIsVoid(true); return; } int len = jenv->GetStringLength(s); aString.SetLength(len); jenv->GetStringRegion(s, 0, len, reinterpret_cast<jchar*>(aString.BeginWriting())); }
void VoicemailStatus::GetReturnMessage(nsString& aReturnMessage) const { aReturnMessage.SetIsVoid(true); mProvider->GetReturnMessage(aReturnMessage); }
void VoicemailStatus::GetReturnNumber(nsString& aReturnNumber) const { aReturnNumber.SetIsVoid(true); mProvider->GetReturnNumber(aReturnNumber); }