mDocLoader->AddObserver((nsIDocumentLoaderObserver*)this);
NS_IMETHODIMP nsWebShell::Create(){     // Cache the PL_EventQueue of the current UI thread...  //  // Since this call must be made on the UI thread, we know the Event Queue  // will be associated with the current thread...  //  nsCOMPtr<nsIEventQueueService> eventService(do_GetService(kEventQueueServiceCID));  NS_ENSURE_TRUE(eventService, NS_ERROR_FAILURE);  NS_ENSURE_SUCCESS(eventService->GetThreadEventQueue(NS_CURRENT_THREAD,   &mThreadEventQueue), NS_ERROR_FAILURE);  WEB_TRACE(WEB_TRACE_CALLS,            ("nsWebShell::Init: this=%p", this));  // HACK....force the uri loader to give us a load cookie for this webshell...then get it's  // doc loader and store it...as more of the docshell lands, we'll be able to get rid  // of this hack...  nsCOMPtr<nsIURILoader> uriLoader = do_GetService(NS_URI_LOADER_CONTRACTID);  uriLoader->GetDocumentLoaderForContext(NS_STATIC_CAST( nsISupports*, (nsIWebShell *) this), &mDocLoader);  // Set the webshell as the default IContentViewerContainer for the loader...  mDocLoader->SetContainer(NS_STATIC_CAST(nsIContentViewerContainer*, (nsIWebShell*)this));   return nsDocShell::Create();}