Dispatch observer service notifications when dom windows are created and destroyed. Bug 326742, r+sr=jst.

git-svn-id: svn://10.0.0.236/trunk@189759 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com
2006-02-11 05:52:33 +00:00
parent 5ff4a6ffdc
commit ab1c46f5e7
2 changed files with 20 additions and 0 deletions

View File

@@ -8134,6 +8134,15 @@ nsDocShell::EnsureScriptEnvironment()
// Note that mScriptGlobal has taken a reference to the script
// context, so we don't have to.
// Notify observers that we've created a new outer window.
// The matching notification for domwindowdestroyed is in
// nsGlobalWindow::~nsGlobalWindow().
nsCOMPtr<nsIObserverService> obsSvc =
do_GetService("@mozilla.org/observer-service;1");
if (obsSvc) {
obsSvc->NotifyObservers(win, "domwindowcreated", nsnull);
}
return NS_OK;
}