Bug 1289211 - Rename InfallibleTArray to nsTArray in media/ r=bwc

Differential Revision: https://phabricator.services.mozilla.com/D36964

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Barret Rennie 2019-07-10 05:58:24 +00:00
parent ec0381b4fc
commit cafb5a8bb7
2 changed files with 9 additions and 11 deletions

View File

@ -1677,7 +1677,7 @@ NS_IMETHODIMP NrTcpSocketIpc::UpdateBufferedAmount(uint32_t buffered_amount,
}
NS_IMETHODIMP NrTcpSocketIpc::FireDataArrayEvent(
const nsAString& aType, const InfallibleTArray<uint8_t>& buffer) {
const nsAString& aType, const nsTArray<uint8_t>& buffer) {
// Called when we received data.
uint8_t* buf = const_cast<uint8_t*>(buffer.Elements());
@ -1833,16 +1833,15 @@ int NrTcpSocketIpc::write(const void* msg, size_t len, size_t* written) {
buffered_bytes_ += len;
{
InfallibleTArray<uint8_t>* arr = new InfallibleTArray<uint8_t>();
nsTArray<uint8_t>* arr = new nsTArray<uint8_t>();
arr->AppendElements(static_cast<const uint8_t*>(msg), len);
// keep track of un-acknowleged writes by tracking number.
writes_in_flight_.push_back(len);
RUN_ON_THREAD(
io_thread_,
mozilla::WrapRunnable(
RefPtr<NrTcpSocketIpc>(this), &NrTcpSocketIpc::write_i,
nsAutoPtr<InfallibleTArray<uint8_t>>(arr), ++tracking_number_),
NS_DISPATCH_NORMAL);
RUN_ON_THREAD(io_thread_,
mozilla::WrapRunnable(
RefPtr<NrTcpSocketIpc>(this), &NrTcpSocketIpc::write_i,
nsAutoPtr<nsTArray<uint8_t>>(arr), ++tracking_number_),
NS_DISPATCH_NORMAL);
}
*written = len;
abort:
@ -1916,7 +1915,7 @@ void NrTcpSocketIpc::connect_i(const nsACString& remote_addr,
}
}
void NrTcpSocketIpc::write_i(nsAutoPtr<InfallibleTArray<uint8_t>> arr,
void NrTcpSocketIpc::write_i(nsAutoPtr<nsTArray<uint8_t>> arr,
uint32_t tracking_number) {
ASSERT_ON_THREAD(io_thread_);
if (!socket_child_) {

View File

@ -362,8 +362,7 @@ class NrTcpSocketIpc : public NrSocketIpc, public nsITCPSocketCallback {
void connect_i(const nsACString& remote_addr, uint16_t remote_port,
const nsACString& local_addr, uint16_t local_port,
const nsACString& tls_host);
void write_i(nsAutoPtr<InfallibleTArray<uint8_t>> buf,
uint32_t tracking_number);
void write_i(nsAutoPtr<nsTArray<uint8_t>> buf, uint32_t tracking_number);
void close_i();
static void release_child_i(dom::TCPSocketChild* aChild);