зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1384294 - replace GetMainThreadEventTarget with GetNeckoTarget in HttpChannelChild. r=mayhemer
GetMainThreadEventTarget doesn't label runnable with correct doc group or tab group. In HttpChannelChild we should replace it with |GetNeckoTarget| in general. By making mIsTrackingResource atomic, HttpChannelChild::ProcessNotifyTrackingResource can be further changed to do direct function call without dispatching additional runnable on main thread. MozReview-Commit-ID: LVvoiljHElX --HG-- extra : rebase_source : 35e85c8afed1411cd60cf2c7ae5cb01cc05f80b2
This commit is contained in:
Родитель
2b16f51241
Коммит
72cfd0cddb
|
@ -631,7 +631,7 @@ protected:
|
|||
int64_t mAltDataLength;
|
||||
|
||||
bool mForceMainDocumentChannel;
|
||||
bool mIsTrackingResource;
|
||||
Atomic<bool, ReleaseAcquire> mIsTrackingResource;
|
||||
|
||||
uint64_t mChannelId;
|
||||
|
||||
|
|
|
@ -1769,8 +1769,8 @@ HttpChannelChild::ProcessNotifyTrackingProtectionDisabled()
|
|||
MOZ_ASSERT(OnSocketThread());
|
||||
|
||||
RefPtr<HttpChannelChild> self = this;
|
||||
nsCOMPtr<nsIEventTarget> mainTarget = GetMainThreadEventTarget();
|
||||
mainTarget->Dispatch(
|
||||
nsCOMPtr<nsIEventTarget> neckoTarget = GetNeckoTarget();
|
||||
neckoTarget->Dispatch(
|
||||
NS_NewRunnableFunction(
|
||||
"nsChannelClassifier::NotifyTrackingProtectionDisabled",
|
||||
[self]() {
|
||||
|
@ -1785,12 +1785,7 @@ HttpChannelChild::ProcessNotifyTrackingResource()
|
|||
LOG(("HttpChannelChild::ProcessNotifyTrackingResource [this=%p]\n", this));
|
||||
MOZ_ASSERT(OnSocketThread());
|
||||
|
||||
nsCOMPtr<nsIEventTarget> mainTarget = GetMainThreadEventTarget();
|
||||
mainTarget->Dispatch(
|
||||
NewRunnableMethod(
|
||||
"HttpChannelChild::SetIsTrackingResource",
|
||||
this, &HttpChannelChild::SetIsTrackingResource),
|
||||
NS_DISPATCH_NORMAL);
|
||||
SetIsTrackingResource();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1815,8 +1810,8 @@ HttpChannelChild::ProcessSetClassifierMatchedInfo(const nsCString& aList,
|
|||
LOG(("HttpChannelChild::ProcessSetClassifierMatchedInfo [this=%p]\n", this));
|
||||
MOZ_ASSERT(OnSocketThread());
|
||||
|
||||
nsCOMPtr<nsIEventTarget> mainTarget = GetMainThreadEventTarget();
|
||||
mainTarget->Dispatch(
|
||||
nsCOMPtr<nsIEventTarget> neckoTarget = GetNeckoTarget();
|
||||
neckoTarget->Dispatch(
|
||||
NewRunnableMethod<const nsCString, const nsCString, const nsCString>
|
||||
("HttpChannelChild::SetMatchedInfo",
|
||||
this, &HttpChannelChild::SetMatchedInfo,
|
||||
|
|
Загрузка…
Ссылка в новой задаче