зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset e3e924da5d5f (bug 1383328)
This commit is contained in:
Родитель
e267d334d9
Коммит
bd7b184c91
|
@ -911,7 +911,6 @@ var RefreshBlocker = {
|
|||
this._filter = Cc["@mozilla.org/appshell/component/browser-status-filter;1"]
|
||||
.createInstance(Ci.nsIWebProgress);
|
||||
this._filter.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_ALL);
|
||||
this._filter.target = tabEventTarget;
|
||||
|
||||
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebProgress);
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#ifndef TabGroup_h
|
||||
#define TabGroup_h
|
||||
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsTHashtable.h"
|
||||
|
@ -44,7 +43,6 @@ class TabChild;
|
|||
// window.opener. A DocGroup is a member of exactly one TabGroup.
|
||||
|
||||
class DocGroup;
|
||||
class TabChild;
|
||||
|
||||
class TabGroup final : public SchedulerGroup
|
||||
{
|
||||
|
|
|
@ -849,13 +849,6 @@ nsFrameMessageManager::GetDocShell(nsIDocShell** aDocShell)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameMessageManager::GetTabEventTarget(nsIEventTarget** aTarget)
|
||||
{
|
||||
*aTarget = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameMessageManager::Btoa(const nsAString& aBinaryData,
|
||||
nsAString& aAsciiBase64String)
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
interface mozIDOMWindowProxy;
|
||||
interface nsIDocShell;
|
||||
interface nsIContent;
|
||||
interface nsIEventTarget;
|
||||
interface nsIFrameLoader;
|
||||
interface nsIPrincipal;
|
||||
|
||||
|
@ -399,12 +398,6 @@ interface nsIContentFrameMessageManager : nsIMessageManagerGlobal
|
|||
* The top level docshell or null.
|
||||
*/
|
||||
readonly attribute nsIDocShell docShell;
|
||||
|
||||
/**
|
||||
* Returns the SchedulerEventTarget corresponding to the TabGroup
|
||||
* for this frame.
|
||||
*/
|
||||
readonly attribute nsIEventTarget tabEventTarget;
|
||||
};
|
||||
|
||||
[uuid(b39a3324-b574-4f85-8cdb-274d04f807ef)]
|
||||
|
|
|
@ -199,14 +199,6 @@ nsInProcessTabChildGlobal::GetDocShell(nsIDocShell** aDocShell)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsInProcessTabChildGlobal::GetTabEventTarget(nsIEventTarget** aTarget)
|
||||
{
|
||||
nsCOMPtr<nsIEventTarget> target = GetMainThreadEventTarget();
|
||||
target.forget(aTarget);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsInProcessTabChildGlobal::FireUnloadEvent()
|
||||
{
|
||||
|
|
|
@ -77,7 +77,6 @@ public:
|
|||
}
|
||||
NS_IMETHOD GetContent(mozIDOMWindowProxy** aContent) override;
|
||||
NS_IMETHOD GetDocShell(nsIDocShell** aDocShell) override;
|
||||
NS_IMETHOD GetTabEventTarget(nsIEventTarget** aTarget) override;
|
||||
|
||||
NS_DECL_NSIINPROCESSCONTENTFRAMEMESSAGEMANAGER
|
||||
|
||||
|
|
|
@ -3520,14 +3520,6 @@ TabChildGlobal::GetDocShell(nsIDocShell** aDocShell)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TabChildGlobal::GetTabEventTarget(nsIEventTarget** aTarget)
|
||||
{
|
||||
nsCOMPtr<nsIEventTarget> target = EventTargetFor(TaskCategory::Other);
|
||||
target.forget(aTarget);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIPrincipal*
|
||||
TabChildGlobal::GetPrincipal()
|
||||
{
|
||||
|
|
|
@ -114,7 +114,6 @@ public:
|
|||
}
|
||||
NS_IMETHOD GetContent(mozIDOMWindowProxy** aContent) override;
|
||||
NS_IMETHOD GetDocShell(nsIDocShell** aDocShell) override;
|
||||
NS_IMETHOD GetTabEventTarget(nsIEventTarget** aTarget) override;
|
||||
|
||||
nsresult AddEventListener(const nsAString& aType,
|
||||
nsIDOMEventListener* aListener,
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "nsITimer.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsString.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
@ -18,8 +17,7 @@ using namespace mozilla;
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
nsBrowserStatusFilter::nsBrowserStatusFilter()
|
||||
: mTarget(GetMainThreadEventTarget())
|
||||
, mCurProgress(0)
|
||||
: mCurProgress(0)
|
||||
, mMaxProgress(0)
|
||||
, mStatusIsDirty(true)
|
||||
, mCurrentPercentage(0)
|
||||
|
@ -114,21 +112,6 @@ nsBrowserStatusFilter::GetLoadType(uint32_t *aLoadType)
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBrowserStatusFilter::GetTarget(nsIEventTarget** aTarget)
|
||||
{
|
||||
nsCOMPtr<nsIEventTarget> target = mTarget;
|
||||
target.forget(aTarget);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBrowserStatusFilter::SetTarget(nsIEventTarget* aTarget)
|
||||
{
|
||||
mTarget = aTarget;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// nsBrowserStatusFilter::nsIWebProgressListener
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -379,7 +362,9 @@ nsBrowserStatusFilter::StartDelayTimer()
|
|||
if (!mTimer)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
mTimer->SetTarget(mTarget);
|
||||
// Use the system group. The browser status filter is always used by chrome
|
||||
// code.
|
||||
mTimer->SetTarget(SystemGroup::EventTargetFor(TaskCategory::Other));
|
||||
return mTimer->InitWithNamedFuncCallback(
|
||||
TimeoutHandler, this, 160, nsITimer::TYPE_ONE_SHOT,
|
||||
"nsBrowserStatusFilter::TimeoutHandler");
|
||||
|
|
|
@ -46,7 +46,6 @@ private:
|
|||
|
||||
private:
|
||||
nsCOMPtr<nsIWebProgressListener> mListener;
|
||||
nsCOMPtr<nsIEventTarget> mTarget;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
|
||||
// delayed values
|
||||
|
|
|
@ -33,7 +33,6 @@ var WebProgressListener = {
|
|||
this._filter = Cc["@mozilla.org/appshell/component/browser-status-filter;1"]
|
||||
.createInstance(Ci.nsIWebProgress);
|
||||
this._filter.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_ALL);
|
||||
this._filter.target = tabEventTarget;
|
||||
|
||||
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebProgress);
|
||||
|
|
|
@ -22,7 +22,6 @@ module.exports = {
|
|||
removeWeakMessageListener: false,
|
||||
sendAsyncMessage: false,
|
||||
sendSyncMessage: false,
|
||||
sendRpcMessage: false,
|
||||
tabEventTarget: false
|
||||
sendRpcMessage: false
|
||||
}
|
||||
};
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nspr.h"
|
||||
#include "mozilla/dom/TabGroup.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
|
||||
|
@ -981,27 +980,6 @@ nsDocLoader::GetLoadType(uint32_t *aLoadType)
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocLoader::GetTarget(nsIEventTarget** aTarget)
|
||||
{
|
||||
nsCOMPtr<mozIDOMWindowProxy> window;
|
||||
nsresult rv = GetDOMWindow(getter_AddRefs(window));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowOuter> piwindow = nsPIDOMWindowOuter::From(window);
|
||||
NS_ENSURE_STATE(piwindow);
|
||||
|
||||
nsCOMPtr<nsIEventTarget> target = piwindow->TabGroup()->EventTargetFor(mozilla::TaskCategory::Other);
|
||||
target.forget(aTarget);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocLoader::SetTarget(nsIEventTarget* aTarget)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
int64_t nsDocLoader::GetMaxTotalProgress()
|
||||
{
|
||||
int64_t newMaxTotal = 0;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include "nsISupports.idl"
|
||||
|
||||
interface mozIDOMWindowProxy;
|
||||
interface nsIEventTarget;
|
||||
interface nsIWebProgressListener;
|
||||
|
||||
/**
|
||||
|
@ -152,11 +151,4 @@ interface nsIWebProgress : nsISupports
|
|||
* nsIDocShellLoadInfo.idl.
|
||||
*/
|
||||
readonly attribute unsigned long loadType;
|
||||
|
||||
/**
|
||||
* Main thread event target to which progress updates should be
|
||||
* dispatched. This typically will be a SchedulerEventTarget
|
||||
* corresponding to the tab requesting updates.
|
||||
*/
|
||||
attribute nsIEventTarget target;
|
||||
};
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
[ptr] native PRThread(PRThread);
|
||||
|
||||
interface nsIEventTarget;
|
||||
interface nsIRunnable;
|
||||
interface nsIThread;
|
||||
|
||||
|
@ -127,9 +126,4 @@ interface nsIThreadManager : nsISupports
|
|||
* moving away from.
|
||||
*/
|
||||
void spinEventLoopUntilEmpty();
|
||||
|
||||
/**
|
||||
* Return the SchedulerEventTarget for the SystemGroup.
|
||||
*/
|
||||
readonly attribute nsIEventTarget systemGroupEventTarget;
|
||||
};
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "nsAutoPtr.h"
|
||||
#include "mozilla/AbstractThread.h"
|
||||
#include "mozilla/InputEventStatistics.h"
|
||||
#include "mozilla/SystemGroup.h"
|
||||
#include "mozilla/ThreadLocal.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#ifdef MOZ_CANARY
|
||||
|
@ -379,14 +378,6 @@ nsThreadManager::SpinEventLoopUntilEmpty()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsThreadManager::GetSystemGroupEventTarget(nsIEventTarget** aTarget)
|
||||
{
|
||||
nsCOMPtr<nsIEventTarget> target = SystemGroup::EventTargetFor(TaskCategory::Other);
|
||||
target.forget(aTarget);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
nsThreadManager::GetHighestNumberOfThreads()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче