зеркало из https://github.com/mozilla/pjs.git
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
This commit is contained in:
Родитель
e975ac1396
Коммит
56ae9a7037
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче