зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1156352: Remove |UnixSocketRawData| from NFC interfaces, r=allstars.chh
This commit is contained in:
Родитель
0d4de1ac5b
Коммит
7f554d1a7f
|
@ -222,7 +222,7 @@ private:
|
|||
class NfcEventRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
NfcEventRunnable(NfcMessageHandler* aHandler, UnixSocketRawData* aData)
|
||||
NfcEventRunnable(NfcMessageHandler* aHandler, UnixSocketBuffer* aData)
|
||||
: mHandler(aHandler), mData(aData)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
@ -255,7 +255,7 @@ public:
|
|||
|
||||
private:
|
||||
NfcMessageHandler* mHandler;
|
||||
nsAutoPtr<UnixSocketRawData> mData;
|
||||
nsAutoPtr<UnixSocketBuffer> mData;
|
||||
};
|
||||
|
||||
NfcService::NfcService()
|
||||
|
@ -383,10 +383,11 @@ NfcService::DispatchNfcEvent(const mozilla::dom::NfcEventOptions& aOptions)
|
|||
}
|
||||
|
||||
void
|
||||
NfcService::ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aData)
|
||||
NfcService::ReceiveSocketData(nsAutoPtr<UnixSocketBuffer>& aBuffer)
|
||||
{
|
||||
MOZ_ASSERT(mHandler);
|
||||
nsCOMPtr<nsIRunnable> runnable = new NfcEventRunnable(mHandler, aData.forget());
|
||||
nsCOMPtr<nsIRunnable> runnable =
|
||||
new NfcEventRunnable(mHandler, aBuffer.forget());
|
||||
mThread->Dispatch(runnable, nsIEventTarget::DISPATCH_NORMAL);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public:
|
|||
void DispatchNfcEvent(const mozilla::dom::NfcEventOptions& aOptions);
|
||||
|
||||
virtual void ReceiveSocketData(
|
||||
nsAutoPtr<mozilla::ipc::UnixSocketRawData>& aData) override;
|
||||
nsAutoPtr<mozilla::ipc::UnixSocketBuffer>& aBuffer) override;
|
||||
|
||||
virtual void OnConnectSuccess(enum SocketType aSocketType) override;
|
||||
virtual void OnConnectError(enum SocketType aSocketType) override;
|
||||
|
|
|
@ -188,12 +188,13 @@ NfcConsumer::PostToNfcDaemon(const uint8_t* aData, size_t aSize)
|
|||
}
|
||||
|
||||
void
|
||||
NfcConsumer::ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aData)
|
||||
NfcConsumer::ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aBuffer)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (mListener) {
|
||||
mListener->ReceiveSocketData(aData);
|
||||
nsAutoPtr<mozilla::ipc::UnixSocketBuffer> buffer(aBuffer.forget());
|
||||
mListener->ReceiveSocketData(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
STREAM_SOCKET
|
||||
};
|
||||
|
||||
virtual void ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aData) = 0;
|
||||
virtual void ReceiveSocketData(nsAutoPtr<UnixSocketBuffer>& aData) = 0;
|
||||
|
||||
virtual void OnConnectSuccess(enum SocketType aSocketType) = 0;
|
||||
virtual void OnConnectError(enum SocketType aSocketType) = 0;
|
||||
|
@ -73,7 +73,7 @@ public:
|
|||
|
||||
private:
|
||||
void ReceiveSocketData(
|
||||
nsAutoPtr<UnixSocketRawData>& aData) override;
|
||||
nsAutoPtr<UnixSocketRawData>& aBuffer) override;
|
||||
|
||||
void OnConnectSuccess() override;
|
||||
void OnConnectError() override;
|
||||
|
|
Загрузка…
Ссылка в новой задаче