mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 908530 part 3. Stop including xpcpublic.h in DOMJSProxyHandler.h. r=khuey
This commit is contained in:
parent
7393f81fff
commit
30987641e2
@ -9,7 +9,7 @@
|
|||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "mozilla/Likely.h"
|
#include "mozilla/Likely.h"
|
||||||
|
|
||||||
#include "xpcpublic.h"
|
#include "jsproxy.h"
|
||||||
#include "nsStringGlue.h"
|
#include "nsStringGlue.h"
|
||||||
|
|
||||||
#define DOM_PROXY_OBJECT_SLOT js::PROXY_PRIVATE_SLOT
|
#define DOM_PROXY_OBJECT_SLOT js::PROXY_PRIVATE_SLOT
|
||||||
@ -26,6 +26,21 @@ enum {
|
|||||||
|
|
||||||
template<typename T> struct Prefable;
|
template<typename T> struct Prefable;
|
||||||
|
|
||||||
|
extern int HandlerFamily;
|
||||||
|
inline void* ProxyFamily() { return &HandlerFamily; }
|
||||||
|
|
||||||
|
inline bool IsDOMProxy(JSObject *obj, const js::Class* clasp)
|
||||||
|
{
|
||||||
|
MOZ_ASSERT(js::GetObjectClass(obj) == clasp);
|
||||||
|
return (js::IsObjectProxyClass(clasp) || js::IsFunctionProxyClass(clasp)) &&
|
||||||
|
js::GetProxyHandler(obj)->family() == ProxyFamily();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool IsDOMProxy(JSObject *obj)
|
||||||
|
{
|
||||||
|
return IsDOMProxy(obj, js::GetObjectClass(obj));
|
||||||
|
}
|
||||||
|
|
||||||
class BaseDOMProxyHandler : public js::BaseProxyHandler
|
class BaseDOMProxyHandler : public js::BaseProxyHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -447,21 +447,6 @@ SimulateActivityCallback(bool aActive);
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
extern int HandlerFamily;
|
|
||||||
inline void* ProxyFamily() { return &HandlerFamily; }
|
|
||||||
|
|
||||||
inline bool IsDOMProxy(JSObject *obj, const js::Class* clasp)
|
|
||||||
{
|
|
||||||
MOZ_ASSERT(js::GetObjectClass(obj) == clasp);
|
|
||||||
return (js::IsObjectProxyClass(clasp) || js::IsFunctionProxyClass(clasp)) &&
|
|
||||||
js::GetProxyHandler(obj)->family() == ProxyFamily();
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool IsDOMProxy(JSObject *obj)
|
|
||||||
{
|
|
||||||
return IsDOMProxy(obj, js::GetObjectClass(obj));
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef JSObject*
|
typedef JSObject*
|
||||||
(*DefineInterface)(JSContext *cx, JS::Handle<JSObject*> global,
|
(*DefineInterface)(JSContext *cx, JS::Handle<JSObject*> global,
|
||||||
JS::Handle<jsid> id, bool defineOnGlobal);
|
JS::Handle<jsid> id, bool defineOnGlobal);
|
||||||
|
Loading…
Reference in New Issue
Block a user