2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-07-06 13:13:12 -07:00
|
|
|
|
|
|
|
#ifndef xpcjsweakreference_h___
|
|
|
|
#define xpcjsweakreference_h___
|
|
|
|
|
|
|
|
#include "xpcIJSWeakReference.h"
|
|
|
|
#include "nsIWeakReference.h"
|
2012-06-12 20:21:08 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-07-06 13:13:12 -07:00
|
|
|
|
2012-06-12 20:21:08 -07:00
|
|
|
class xpcJSWeakReference MOZ_FINAL : public xpcIJSWeakReference
|
2007-07-06 13:13:12 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
xpcJSWeakReference();
|
2011-12-18 02:11:56 -08:00
|
|
|
nsresult Init(JSContext* cx, const JS::Value& object);
|
2007-07-06 13:13:12 -07:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_XPCIJSWEAKREFERENCE
|
2011-10-14 10:52:47 -07:00
|
|
|
|
2007-07-06 13:13:12 -07:00
|
|
|
private:
|
2012-04-01 19:21:13 -07:00
|
|
|
nsCOMPtr<nsIWeakReference> mReferent;
|
2007-07-06 13:13:12 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // xpcjsweakreference_h___
|