diff --git a/docshell/base/nsWebShell.cpp b/docshell/base/nsWebShell.cpp index df2e83256ee..938b3096f03 100644 --- a/docshell/base/nsWebShell.cpp +++ b/docshell/base/nsWebShell.cpp @@ -23,6 +23,7 @@ #include "nsDocShell.h" #include "nsIWebShell.h" +#include "nsIWebBrowserChrome.h" #include "nsIInterfaceRequestor.h" #include "nsIDocumentLoader.h" #include "nsIDocumentLoaderObserver.h" @@ -2715,14 +2716,11 @@ nsWebShell::OnOverLink(nsIContent* aContent, mOverURL = aURLSpec; mOverTarget = aTargetSpec; - // Get the browser window and setStatus - nsIBrowserWindow *browserWindow; - browserWindow = GetBrowserWindow(); - if (nsnull != browserWindow) { - browserWindow->SetStatus(aURLSpec); - NS_RELEASE(browserWindow); - } + nsCOMPtr browserChrome(do_GetInterface(mTreeOwner)); + + if (browserChrome) + browserChrome->SetJSStatus(aURLSpec); } return NS_OK; } diff --git a/webshell/src/nsWebShell.cpp b/webshell/src/nsWebShell.cpp index df2e83256ee..938b3096f03 100644 --- a/webshell/src/nsWebShell.cpp +++ b/webshell/src/nsWebShell.cpp @@ -23,6 +23,7 @@ #include "nsDocShell.h" #include "nsIWebShell.h" +#include "nsIWebBrowserChrome.h" #include "nsIInterfaceRequestor.h" #include "nsIDocumentLoader.h" #include "nsIDocumentLoaderObserver.h" @@ -2715,14 +2716,11 @@ nsWebShell::OnOverLink(nsIContent* aContent, mOverURL = aURLSpec; mOverTarget = aTargetSpec; - // Get the browser window and setStatus - nsIBrowserWindow *browserWindow; - browserWindow = GetBrowserWindow(); - if (nsnull != browserWindow) { - browserWindow->SetStatus(aURLSpec); - NS_RELEASE(browserWindow); - } + nsCOMPtr browserChrome(do_GetInterface(mTreeOwner)); + + if (browserChrome) + browserChrome->SetJSStatus(aURLSpec); } return NS_OK; }