Throw from our Init() method if we're already initialized, so we don't add
ourselves to various lists twice. Bug 282784, r=kaie, sr=jst, a=asa git-svn-id: svn://10.0.0.236/trunk@172024 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -177,8 +177,19 @@ NS_IMETHODIMP
|
||||
nsSecureBrowserUIImpl::Init(nsIDOMWindow *window)
|
||||
{
|
||||
PR_LOG(gSecureDocLog, PR_LOG_DEBUG,
|
||||
("SecureUI:%p: Init\n", this));
|
||||
("SecureUI:%p: Init: mWindow: %p, window: %p\n", this, mWindow.get(),
|
||||
window));
|
||||
|
||||
if (!window) {
|
||||
NS_WARNING("Null window passed to nsSecureBrowserUIImpl::Init()");
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (mWindow) {
|
||||
NS_WARNING("Trying to init an nsSecureBrowserUIImpl twice");
|
||||
return NS_ERROR_ALREADY_INITIALIZED;
|
||||
}
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
mWindow = window;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user