зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1343743 - Part3-1: Use system group's event target for TCPSocketChild's constructor, r=bwc
Pass an event target argument in constructor, so we can call gNeckoChild->SetEventTargetForActor before sending constructor message to parent.
This commit is contained in:
Родитель
56e1084587
Коммит
a2f2bae579
|
@ -110,6 +110,7 @@ nrappkit copyright:
|
|||
#include "mozilla/SyncRunnable.h"
|
||||
#include "nsTArray.h"
|
||||
#include "mozilla/dom/TCPSocketBinding.h"
|
||||
#include "mozilla/SystemGroup.h"
|
||||
#include "nsITCPSocketCallback.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
|
@ -1969,9 +1970,16 @@ void NrTcpSocketIpc::connect_i(const nsACString &remote_addr,
|
|||
uint16_t local_port,
|
||||
const nsACString &tls_host) {
|
||||
ASSERT_ON_THREAD(io_thread_);
|
||||
// io_thread_ was initialized as main thread at constructor,
|
||||
// so the following assertion should be true.
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
mirror_state_ = NR_CONNECTING;
|
||||
|
||||
dom::TCPSocketChild* child = new dom::TCPSocketChild(NS_ConvertUTF8toUTF16(remote_addr), remote_port);
|
||||
dom::TCPSocketChild* child =
|
||||
new dom::TCPSocketChild(NS_ConvertUTF8toUTF16(remote_addr),
|
||||
remote_port,
|
||||
SystemGroup::EventTargetFor(TaskCategory::Other));
|
||||
socket_child_ = child;
|
||||
|
||||
// Bug 1285330: put filtering back in here
|
||||
|
|
Загрузка…
Ссылка в новой задаче