mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
add first-window case - when the window with the new title hasn't been seen, add it to the hashtable
This commit is contained in:
parent
07bd7dd42b
commit
e83eaff6cf
@ -159,6 +159,12 @@ nsWindowDataSource::OnWindowTitleChange(nsIXULWindow *window,
|
||||
nsCOMPtr<nsISupports> sup =
|
||||
dont_AddRef(mWindowResources.Get(&key));
|
||||
|
||||
// oops, make sure this window is in the hashtable!
|
||||
if (!sup) {
|
||||
OnOpenWindow(window);
|
||||
sup = dont_AddRef(mWindowResources.Get(&key));
|
||||
}
|
||||
|
||||
NS_ENSURE_TRUE(sup, NS_ERROR_UNEXPECTED);
|
||||
|
||||
nsCOMPtr<nsIRDFResource> windowResource =
|
||||
|
Loading…
Reference in New Issue
Block a user