зеркало из https://github.com/mozilla/gecko-dev.git
Bug 785583 - BluetoothReplyRunnable instantiates nsAutoPtr template in the header r=qdot
This commit is contained in:
Родитель
5f0b208a77
Коммит
f7fb883ca8
|
@ -21,6 +21,7 @@
|
|||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "mozilla/LazyIdleThread.h"
|
||||
#include "mozilla/Util.h"
|
||||
#include "nsIDOMDOMRequest.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
|
|
@ -7,9 +7,29 @@
|
|||
#include "base/basictypes.h"
|
||||
#include "BluetoothTypes.h"
|
||||
#include "BluetoothReplyRunnable.h"
|
||||
#include "nsIDOMDOMRequest.h"
|
||||
|
||||
USING_BLUETOOTH_NAMESPACE
|
||||
|
||||
BluetoothReplyRunnable::BluetoothReplyRunnable(nsIDOMDOMRequest* aReq)
|
||||
: mDOMRequest(aReq)
|
||||
{}
|
||||
|
||||
void
|
||||
BluetoothReplyRunnable::SetReply(BluetoothReply* aReply)
|
||||
{
|
||||
mReply = aReply;
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothReplyRunnable::ReleaseMembers()
|
||||
{
|
||||
mDOMRequest = nullptr;
|
||||
}
|
||||
|
||||
BluetoothReplyRunnable::~BluetoothReplyRunnable()
|
||||
{}
|
||||
|
||||
nsresult
|
||||
BluetoothReplyRunnable::FireReply(const jsval& aVal)
|
||||
{
|
||||
|
@ -72,3 +92,11 @@ BluetoothReplyRunnable::Run()
|
|||
|
||||
return rv;
|
||||
}
|
||||
|
||||
BluetoothVoidReplyRunnable::BluetoothVoidReplyRunnable(nsIDOMDOMRequest* aReq)
|
||||
: BluetoothReplyRunnable(aReq)
|
||||
{}
|
||||
|
||||
BluetoothVoidReplyRunnable::~BluetoothVoidReplyRunnable()
|
||||
{}
|
||||
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
|
||||
#include "BluetoothCommon.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsIDOMDOMRequest.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
class nsIDOMDOMRequest;
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
class BluetoothReply;
|
||||
|
@ -21,30 +22,19 @@ class BluetoothReplyRunnable : public nsRunnable
|
|||
public:
|
||||
NS_DECL_NSIRUNNABLE
|
||||
|
||||
BluetoothReplyRunnable(nsIDOMDOMRequest* aReq) :
|
||||
mDOMRequest(aReq)
|
||||
{
|
||||
}
|
||||
BluetoothReplyRunnable(nsIDOMDOMRequest* aReq);
|
||||
|
||||
void SetReply(BluetoothReply* aReply)
|
||||
{
|
||||
mReply = aReply;
|
||||
}
|
||||
void SetReply(BluetoothReply* aReply);
|
||||
|
||||
void SetError(const nsAString& aError)
|
||||
{
|
||||
mErrorString = aError;
|
||||
}
|
||||
|
||||
virtual void ReleaseMembers()
|
||||
{
|
||||
mDOMRequest = nullptr;
|
||||
}
|
||||
virtual void ReleaseMembers();
|
||||
|
||||
protected:
|
||||
virtual ~BluetoothReplyRunnable()
|
||||
{
|
||||
}
|
||||
virtual ~BluetoothReplyRunnable();
|
||||
|
||||
virtual bool ParseSuccessfulReply(jsval* aValue) = 0;
|
||||
|
||||
|
@ -64,15 +54,9 @@ private:
|
|||
class BluetoothVoidReplyRunnable : public BluetoothReplyRunnable
|
||||
{
|
||||
public:
|
||||
BluetoothVoidReplyRunnable(nsIDOMDOMRequest* aReq) :
|
||||
BluetoothReplyRunnable(aReq)
|
||||
{
|
||||
}
|
||||
BluetoothVoidReplyRunnable(nsIDOMDOMRequest* aReq);
|
||||
~BluetoothVoidReplyRunnable();
|
||||
|
||||
virtual void ReleaseMembers()
|
||||
{
|
||||
BluetoothReplyRunnable::ReleaseMembers();
|
||||
}
|
||||
protected:
|
||||
virtual bool ParseSuccessfulReply(jsval* aValue)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче