зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1343743 - Part5: Label PAltDataOutputStreamChild, r=mayhemer
Use neckoTarget in HttpChannelChild to label PAltDataOutputStreamChild actor.
This commit is contained in:
Родитель
d17d3c6887
Коммит
f903c2a340
|
@ -119,9 +119,9 @@ NeckoChild::AllocPAltDataOutputStreamChild(
|
|||
const nsCString& type,
|
||||
PHttpChannelChild* channel)
|
||||
{
|
||||
AltDataOutputStreamChild* stream = new AltDataOutputStreamChild();
|
||||
stream->AddIPDLReference();
|
||||
return stream;
|
||||
// We don't allocate here: see HttpChannelChild::OpenAlternativeOutputStream()
|
||||
NS_NOTREACHED("AllocPAltDataOutputStreamChild should not be called");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -2715,8 +2715,20 @@ HttpChannelChild::OpenAlternativeOutputStream(const nsACString & aType, nsIOutpu
|
|||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
RefPtr<AltDataOutputStreamChild> stream =
|
||||
static_cast<AltDataOutputStreamChild*>(gNeckoChild->SendPAltDataOutputStreamConstructor(nsCString(aType), this));
|
||||
nsCOMPtr<nsIEventTarget> neckoTarget = GetNeckoTarget();
|
||||
MOZ_ASSERT(neckoTarget);
|
||||
|
||||
RefPtr<AltDataOutputStreamChild> stream = new AltDataOutputStreamChild();
|
||||
stream->AddIPDLReference();
|
||||
|
||||
gNeckoChild->SetEventTargetForActor(stream, neckoTarget);
|
||||
|
||||
if (!gNeckoChild->SendPAltDataOutputStreamConstructor(stream,
|
||||
nsCString(aType),
|
||||
this)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
stream.forget(_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче