зеркало из https://github.com/mozilla/gecko-dev.git
Bug 18058. Remove 'commandDispatcher' from interface; obsolete, and leaky. r=hyatt, a=chofmann
This commit is contained in:
Родитель
dfd9dd6eaa
Коммит
87b8e4a574
|
@ -26,7 +26,6 @@
|
|||
#include "nsISupportsArray.h"
|
||||
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMXULCommandDispatcher.h"
|
||||
#include "nsIXULCommandDispatcher.h"
|
||||
#include "nsIDOMFocusListener.h"
|
||||
#include "nsRDFCID.h"
|
||||
|
@ -76,13 +75,12 @@ public:
|
|||
|
||||
protected:
|
||||
nsISupportsArray* mControllers;
|
||||
nsIDOMXULCommandDispatcher* mCommandDispatcher;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
XULControllersImpl::XULControllersImpl(void) :
|
||||
mControllers(nsnull), mCommandDispatcher(nsnull)
|
||||
mControllers(nsnull)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
@ -90,7 +88,6 @@ XULControllersImpl::XULControllersImpl(void) :
|
|||
XULControllersImpl::~XULControllersImpl(void)
|
||||
{
|
||||
NS_IF_RELEASE(mControllers);
|
||||
NS_IF_RELEASE(mCommandDispatcher);
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF(XULControllersImpl)
|
||||
|
@ -118,22 +115,6 @@ XULControllersImpl::QueryInterface(REFNSIID iid, void** result)
|
|||
}
|
||||
|
||||
|
||||
/* attribute nsIDOMXULCommandDispatcher commandDispatcher; */
|
||||
NS_IMETHODIMP XULControllersImpl::GetCommandDispatcher(nsIDOMXULCommandDispatcher * *aCommandDispatcher)
|
||||
{
|
||||
NS_IF_ADDREF(mCommandDispatcher);
|
||||
*aCommandDispatcher = mCommandDispatcher;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP XULControllersImpl::SetCommandDispatcher(nsIDOMXULCommandDispatcher * aCommandDispatcher)
|
||||
{
|
||||
NS_IF_RELEASE(mCommandDispatcher);
|
||||
mCommandDispatcher = aCommandDispatcher;
|
||||
NS_IF_ADDREF(mCommandDispatcher);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* boolean SupportsCommand (in string command); */
|
||||
NS_IMETHODIMP XULControllersImpl::GetControllerForCommand(const PRUnichar *command, nsIController** _retval)
|
||||
{
|
||||
|
|
|
@ -4244,12 +4244,15 @@ nsXULDocument::AddChromeOverlays()
|
|||
if (NS_FAILED(rv))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
rv = mCurrentPrototype->GetURI(getter_AddRefs(uri));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsISimpleEnumerator> oe;
|
||||
reg->GetOverlays(uri, getter_AddRefs(oe));
|
||||
|
||||
{
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
rv = mCurrentPrototype->GetURI(getter_AddRefs(uri));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
reg->GetOverlays(uri, getter_AddRefs(oe));
|
||||
}
|
||||
|
||||
if (!oe)
|
||||
return NS_OK;
|
||||
|
@ -4520,7 +4523,7 @@ nsXULDocument::ResumeWalk()
|
|||
nsTime finish = PR_Now();
|
||||
nsInt64 diff64 = finish - mLoadStart;
|
||||
PRInt32 diff = PRInt32(diff64 / nsInt64(1000));
|
||||
printf("***** XUL document loaded in %ldmsec\n", diff);
|
||||
printf("***** XUL document loaded in %dmsec\n", diff);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -4545,13 +4548,13 @@ nsXULDocument::ResumeWalk()
|
|||
nsTime finish = PR_Now();
|
||||
nsInt64 diff64 = finish - mLoadStart;
|
||||
PRInt32 diff = PRInt32(diff64 / nsInt64(1000));
|
||||
printf("***** XUL document flowed in %ldmsec\n", diff);
|
||||
printf("***** XUL document flowed in %dmsec\n", diff);
|
||||
}
|
||||
|
||||
{
|
||||
nsInt64 now(PR_Now());
|
||||
now /= nsInt64(1000);
|
||||
printf("### ResumeWalk complete %ld\n", PRInt32(now));
|
||||
printf("### ResumeWalk complete %d\n", PRInt32(now));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "nsISupportsArray.h"
|
||||
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMXULCommandDispatcher.h"
|
||||
#include "nsIXULCommandDispatcher.h"
|
||||
#include "nsIDOMFocusListener.h"
|
||||
#include "nsRDFCID.h"
|
||||
|
@ -76,13 +75,12 @@ public:
|
|||
|
||||
protected:
|
||||
nsISupportsArray* mControllers;
|
||||
nsIDOMXULCommandDispatcher* mCommandDispatcher;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
XULControllersImpl::XULControllersImpl(void) :
|
||||
mControllers(nsnull), mCommandDispatcher(nsnull)
|
||||
mControllers(nsnull)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
@ -90,7 +88,6 @@ XULControllersImpl::XULControllersImpl(void) :
|
|||
XULControllersImpl::~XULControllersImpl(void)
|
||||
{
|
||||
NS_IF_RELEASE(mControllers);
|
||||
NS_IF_RELEASE(mCommandDispatcher);
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF(XULControllersImpl)
|
||||
|
@ -118,22 +115,6 @@ XULControllersImpl::QueryInterface(REFNSIID iid, void** result)
|
|||
}
|
||||
|
||||
|
||||
/* attribute nsIDOMXULCommandDispatcher commandDispatcher; */
|
||||
NS_IMETHODIMP XULControllersImpl::GetCommandDispatcher(nsIDOMXULCommandDispatcher * *aCommandDispatcher)
|
||||
{
|
||||
NS_IF_ADDREF(mCommandDispatcher);
|
||||
*aCommandDispatcher = mCommandDispatcher;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP XULControllersImpl::SetCommandDispatcher(nsIDOMXULCommandDispatcher * aCommandDispatcher)
|
||||
{
|
||||
NS_IF_RELEASE(mCommandDispatcher);
|
||||
mCommandDispatcher = aCommandDispatcher;
|
||||
NS_IF_ADDREF(mCommandDispatcher);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* boolean SupportsCommand (in string command); */
|
||||
NS_IMETHODIMP XULControllersImpl::GetControllerForCommand(const PRUnichar *command, nsIController** _retval)
|
||||
{
|
||||
|
|
|
@ -4244,12 +4244,15 @@ nsXULDocument::AddChromeOverlays()
|
|||
if (NS_FAILED(rv))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
rv = mCurrentPrototype->GetURI(getter_AddRefs(uri));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsISimpleEnumerator> oe;
|
||||
reg->GetOverlays(uri, getter_AddRefs(oe));
|
||||
|
||||
{
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
rv = mCurrentPrototype->GetURI(getter_AddRefs(uri));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
reg->GetOverlays(uri, getter_AddRefs(oe));
|
||||
}
|
||||
|
||||
if (!oe)
|
||||
return NS_OK;
|
||||
|
@ -4520,7 +4523,7 @@ nsXULDocument::ResumeWalk()
|
|||
nsTime finish = PR_Now();
|
||||
nsInt64 diff64 = finish - mLoadStart;
|
||||
PRInt32 diff = PRInt32(diff64 / nsInt64(1000));
|
||||
printf("***** XUL document loaded in %ldmsec\n", diff);
|
||||
printf("***** XUL document loaded in %dmsec\n", diff);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -4545,13 +4548,13 @@ nsXULDocument::ResumeWalk()
|
|||
nsTime finish = PR_Now();
|
||||
nsInt64 diff64 = finish - mLoadStart;
|
||||
PRInt32 diff = PRInt32(diff64 / nsInt64(1000));
|
||||
printf("***** XUL document flowed in %ldmsec\n", diff);
|
||||
printf("***** XUL document flowed in %dmsec\n", diff);
|
||||
}
|
||||
|
||||
{
|
||||
nsInt64 now(PR_Now());
|
||||
now /= nsInt64(1000);
|
||||
printf("### ResumeWalk complete %ld\n", PRInt32(now));
|
||||
printf("### ResumeWalk complete %d\n", PRInt32(now));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче