Commit 575c25f9 authored by Tatiana Meshkova's avatar Tatiana Meshkova

Update to latest comPTR API

parent 853bb6a7
......@@ -54,7 +54,7 @@ GetDOMWindowByNode(nsIDOMNode *aNode, nsIDOMWindow **aDOMWindow)
nsCOMPtr<nsIDOMWindow> targetWin;
rv = ctDoc->GetDefaultView(getter_AddRefs(targetWin));
NS_ENSURE_SUCCESS(rv , rv);
*aDOMWindow = targetWin.forget().get();
*aDOMWindow = targetWin.forget().take();
return rv;
}
......@@ -70,7 +70,7 @@ GetTopWindow(nsIDOMWindow* aWin, nsIDOMWindow **aDOMWindow)
nsCOMPtr<nsIDOMWindow> rootWin(do_GetInterface(rootItem));
NS_ENSURE_TRUE(rootWin, NS_ERROR_FAILURE);
rootWin->GetTop(getter_AddRefs(window));
*aDOMWindow = window.forget().get();
*aDOMWindow = window.forget().take();
return NS_OK;
}
......
......@@ -100,10 +100,10 @@ EmbedPromptFactory::GetPrompt(nsIDOMWindow* aParent, const nsIID& iid, void **re
if (iid.Equals(NS_GET_IID(nsIAuthPrompt)) ||
iid.Equals(NS_GET_IID(nsIAuthPrompt2))) {
nsRefPtr<EmbedAuthPromptService> service = new EmbedAuthPromptService(parent);
*result = service.forget().get();
*result = service.forget().take();
} else if (iid.Equals(NS_GET_IID(nsIPrompt))) {
nsRefPtr<EmbedPromptService> service = new EmbedPromptService(parent);
*result = service.forget().get();
*result = service.forget().take();
}
return NS_OK;
......@@ -691,7 +691,7 @@ EmbedAuthPromptService::AsyncPromptAuth(nsIChannel* aChannel,
EmbedAsyncAuthPrompt* asyncPrompt = asyncPrompts[hashKey.get()];
if (asyncPrompt) {
asyncPrompt->consumers.AppendElement(consumer);
*_retval = consumer.forget().get();
*_retval = consumer.forget().take();
return NS_OK;
}
asyncPrompt = new EmbedAsyncAuthPrompt(consumer, aChannel, authInfo, level, false);
......
......@@ -278,7 +278,7 @@ static bool HasFrameElement(nsIDOMDocument* aDocument, nsIDOMElement* *aFrameEle
return false;
}
if (aFrameElement) {
*aFrameElement = frameElement.forget().get();
*aFrameElement = frameElement.forget().take();
}
return true;
}
......@@ -311,7 +311,7 @@ static void GetParentFrame(nsIDOMWindow* aWindow, nsIDOMWindow** outWindow)
nsCOMPtr<nsIDOMWindow> newWin;
if (aWindow) {
aWindow->GetParent(getter_AddRefs(newWin));
*outWindow = newWin.forget().get();
*outWindow = newWin.forget().take();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment