From cafb5a8bb7b6b7a08d0c1f7b3741902f07a4c887 Mon Sep 17 00:00:00 2001 From: Barret Rennie Date: Wed, 10 Jul 2019 05:58:24 +0000 Subject: [PATCH] Bug 1289211 - Rename InfallibleTArray to nsTArray in media/ r=bwc Differential Revision: https://phabricator.services.mozilla.com/D36964 --HG-- extra : moz-landing-system : lando --- media/mtransport/nr_socket_prsock.cpp | 17 ++++++++--------- media/mtransport/nr_socket_prsock.h | 3 +-- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/media/mtransport/nr_socket_prsock.cpp b/media/mtransport/nr_socket_prsock.cpp index b2cf7dd9c241..0a42ee7e2366 100644 --- a/media/mtransport/nr_socket_prsock.cpp +++ b/media/mtransport/nr_socket_prsock.cpp @@ -1677,7 +1677,7 @@ NS_IMETHODIMP NrTcpSocketIpc::UpdateBufferedAmount(uint32_t buffered_amount, } NS_IMETHODIMP NrTcpSocketIpc::FireDataArrayEvent( - const nsAString& aType, const InfallibleTArray& buffer) { + const nsAString& aType, const nsTArray& buffer) { // Called when we received data. uint8_t* buf = const_cast(buffer.Elements()); @@ -1833,16 +1833,15 @@ int NrTcpSocketIpc::write(const void* msg, size_t len, size_t* written) { buffered_bytes_ += len; { - InfallibleTArray* arr = new InfallibleTArray(); + nsTArray* arr = new nsTArray(); arr->AppendElements(static_cast(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(this), &NrTcpSocketIpc::write_i, - nsAutoPtr>(arr), ++tracking_number_), - NS_DISPATCH_NORMAL); + RUN_ON_THREAD(io_thread_, + mozilla::WrapRunnable( + RefPtr(this), &NrTcpSocketIpc::write_i, + nsAutoPtr>(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> arr, +void NrTcpSocketIpc::write_i(nsAutoPtr> arr, uint32_t tracking_number) { ASSERT_ON_THREAD(io_thread_); if (!socket_child_) { diff --git a/media/mtransport/nr_socket_prsock.h b/media/mtransport/nr_socket_prsock.h index dc7a1d12c18a..3165324c12db 100644 --- a/media/mtransport/nr_socket_prsock.h +++ b/media/mtransport/nr_socket_prsock.h @@ -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> buf, - uint32_t tracking_number); + void write_i(nsAutoPtr> buf, uint32_t tracking_number); void close_i(); static void release_child_i(dom::TCPSocketChild* aChild);