mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Fix bug 64412: security warning dialogs must be dismissed twice. r=pollman, a=ben
This commit is contained in:
parent
79ff2227f2
commit
879801f0ef
@ -465,12 +465,13 @@ nsBrowserInstance::~nsBrowserInstance()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsBrowserInstance::ReinitializeContentVariables()
|
nsBrowserInstance::ReinitializeContentWindow()
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMWindowInternal> contentWindow;
|
nsCOMPtr<nsIDOMWindowInternal> contentWindow;
|
||||||
mDOMWindow->Get_content(getter_AddRefs(contentWindow));
|
mDOMWindow->Get_content(getter_AddRefs(contentWindow));
|
||||||
|
|
||||||
nsCOMPtr<nsIScriptGlobalObject> globalObj(do_QueryInterface(contentWindow));
|
nsCOMPtr<nsIScriptGlobalObject> globalObj(do_QueryInterface(contentWindow));
|
||||||
|
|
||||||
if (globalObj) {
|
if (globalObj) {
|
||||||
@ -528,9 +529,17 @@ nsBrowserInstance::ReinitializeContentVariables()
|
|||||||
mUrlbarHistory = ubHistory;
|
mUrlbarHistory = ubHistory;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
nsBrowserInstance::ReinitializeContentVariables()
|
||||||
|
{
|
||||||
|
ReinitializeContentWindow();
|
||||||
|
|
||||||
|
nsresult rv;
|
||||||
|
|
||||||
/* reinitialize the security module */
|
/* reinitialize the security module */
|
||||||
nsCOMPtr<nsSecureBrowserUI> security = do_CreateInstance(NS_SECURE_BROWSER_UI_CONTRACTID, &rv);
|
nsCOMPtr<nsSecureBrowserUI> security(do_CreateInstance(NS_SECURE_BROWSER_UI_CONTRACTID, &rv));
|
||||||
if (NS_SUCCEEDED(rv) && security) {
|
if (NS_SUCCEEDED(rv) && security) {
|
||||||
nsCOMPtr<nsIDOMDocument> doc;
|
nsCOMPtr<nsIDOMDocument> doc;
|
||||||
rv = mDOMWindow->GetDocument(getter_AddRefs(doc));
|
rv = mDOMWindow->GetDocument(getter_AddRefs(doc));
|
||||||
@ -538,6 +547,9 @@ nsBrowserInstance::ReinitializeContentVariables()
|
|||||||
nsCOMPtr<nsIDOMElement> button;
|
nsCOMPtr<nsIDOMElement> button;
|
||||||
rv = doc->GetElementById(NS_LITERAL_STRING("security-button"), getter_AddRefs(button));
|
rv = doc->GetElementById(NS_LITERAL_STRING("security-button"), getter_AddRefs(button));
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
|
nsCOMPtr<nsIDOMWindowInternal> contentWindow;
|
||||||
|
mDOMWindow->Get_content(getter_AddRefs(contentWindow));
|
||||||
|
|
||||||
security->Init(contentWindow, button);
|
security->Init(contentWindow, button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -798,7 +810,7 @@ nsBrowserInstance::SetWebShellWindow(nsIDOMWindowInternal* aWin)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReinitializeContentVariables();
|
ReinitializeContentWindow();
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,7 @@ class nsBrowserInstance : public nsIBrowserInstance,
|
|||||||
|
|
||||||
nsresult GetFocussedContentWindow(nsIDOMWindowInternal** outFocussedWindow);
|
nsresult GetFocussedContentWindow(nsIDOMWindowInternal** outFocussedWindow);
|
||||||
|
|
||||||
|
void ReinitializeContentWindow();
|
||||||
void ReinitializeContentVariables();
|
void ReinitializeContentVariables();
|
||||||
|
|
||||||
nsresult InitializeSearch(nsIDOMWindowInternal* windowToSearch, nsIFindComponent *finder );
|
nsresult InitializeSearch(nsIDOMWindowInternal* windowToSearch, nsIFindComponent *finder );
|
||||||
|
Loading…
Reference in New Issue
Block a user