Destroy();
if (nsnull != mHistoryService) { nsServiceManager::ReleaseService(kGlobalHistoryCID, mHistoryService); mHistoryService = nsnull; }
nsWebShell::~nsWebShell(){   Destroy();  // Stop any pending document loads and destroy the loader...  if (mDocLoader) {    mDocLoader->Stop();    mDocLoader->SetContainer(nsnull);    mDocLoader->Destroy();    mDocLoader = nsnull;  }  // Cancel any timers that were set for this loader.  CancelRefreshURITimers();  ++mRefCnt; // following releases can cause this destructor to be called             // recursively if the refcount is allowed to remain 0  mContentViewer=nsnull;  mDeviceContext=nsnull;  NS_IF_RELEASE(mContainer);  if (mScriptGlobal) {    mScriptGlobal->SetDocShell(nsnull);    mScriptGlobal = nsnull;  }  if (mScriptContext) {    mScriptContext->SetOwner(nsnull);    mScriptContext = nsnull;  }  InitFrameData();#ifdef DEBUG  // We're counting the number of |nsWebShells| to help find leaks  --gNumberOfWebShells;#endif#ifdef DEBUG  printf("WEBSHELL- = %ld\n", gNumberOfWebShells);#endif}