mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
bug #110179 (r=danm@netscape.com, sr=jst@netscape.com) The domwindowopened notification should *not* be fired while the window watcher is holding onto its internal lock.
This commit is contained in:
parent
e999d8db14
commit
0fae973a2e
@ -796,26 +796,28 @@ nsWindowWatcher::AddWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome *aChrome)
|
||||
if (!aWindow)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
nsWatcherWindowEntry *info;
|
||||
nsAutoLock lock(mListLock);
|
||||
{
|
||||
nsWatcherWindowEntry *info;
|
||||
nsAutoLock lock(mListLock);
|
||||
|
||||
// if we already have an entry for this window, adjust
|
||||
// its chrome mapping and return
|
||||
info = FindWindowEntry(aWindow);
|
||||
if (info) {
|
||||
info->mChrome = aChrome;
|
||||
return NS_OK;
|
||||
}
|
||||
// if we already have an entry for this window, adjust
|
||||
// its chrome mapping and return
|
||||
info = FindWindowEntry(aWindow);
|
||||
if (info) {
|
||||
info->mChrome = aChrome;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// create a window info struct and add it to the list of windows
|
||||
info = new nsWatcherWindowEntry(aWindow, aChrome);
|
||||
if (!info)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
// create a window info struct and add it to the list of windows
|
||||
info = new nsWatcherWindowEntry(aWindow, aChrome);
|
||||
if (!info)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
if (mOldestWindow)
|
||||
info->InsertAfter(mOldestWindow->mOlder);
|
||||
else
|
||||
mOldestWindow = info;
|
||||
if (mOldestWindow)
|
||||
info->InsertAfter(mOldestWindow->mOlder);
|
||||
else
|
||||
mOldestWindow = info;
|
||||
} // leave the mListLock
|
||||
|
||||
// a window being added to us signifies a newly opened window.
|
||||
// send notifications.
|
||||
|
Loading…
x
Reference in New Issue
Block a user