mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +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
|
||||
nsBrowserInstance::ReinitializeContentVariables()
|
||||
nsBrowserInstance::ReinitializeContentWindow()
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIDOMWindowInternal> contentWindow;
|
||||
mDOMWindow->Get_content(getter_AddRefs(contentWindow));
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> globalObj(do_QueryInterface(contentWindow));
|
||||
|
||||
if (globalObj) {
|
||||
@ -528,9 +529,17 @@ nsBrowserInstance::ReinitializeContentVariables()
|
||||
mUrlbarHistory = ubHistory;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsBrowserInstance::ReinitializeContentVariables()
|
||||
{
|
||||
ReinitializeContentWindow();
|
||||
|
||||
nsresult rv;
|
||||
|
||||
/* 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) {
|
||||
nsCOMPtr<nsIDOMDocument> doc;
|
||||
rv = mDOMWindow->GetDocument(getter_AddRefs(doc));
|
||||
@ -538,6 +547,9 @@ nsBrowserInstance::ReinitializeContentVariables()
|
||||
nsCOMPtr<nsIDOMElement> button;
|
||||
rv = doc->GetElementById(NS_LITERAL_STRING("security-button"), getter_AddRefs(button));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsIDOMWindowInternal> contentWindow;
|
||||
mDOMWindow->Get_content(getter_AddRefs(contentWindow));
|
||||
|
||||
security->Init(contentWindow, button);
|
||||
}
|
||||
}
|
||||
@ -798,7 +810,7 @@ nsBrowserInstance::SetWebShellWindow(nsIDOMWindowInternal* aWin)
|
||||
}
|
||||
}
|
||||
|
||||
ReinitializeContentVariables();
|
||||
ReinitializeContentWindow();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -92,6 +92,7 @@ class nsBrowserInstance : public nsIBrowserInstance,
|
||||
|
||||
nsresult GetFocussedContentWindow(nsIDOMWindowInternal** outFocussedWindow);
|
||||
|
||||
void ReinitializeContentWindow();
|
||||
void ReinitializeContentVariables();
|
||||
|
||||
nsresult InitializeSearch(nsIDOMWindowInternal* windowToSearch, nsIFindComponent *finder );
|
||||
|
Loading…
Reference in New Issue
Block a user