Bug 791566 - Update old new proxy bindings to BaseProxyHandler::hasInstance changes; r=terrence

This commit is contained in:
Ms2ger 2012-09-20 09:55:36 +02:00
parent f86a750c05
commit e37e5c980c
2 changed files with 4 additions and 3 deletions

View File

@ -956,9 +956,10 @@ ListBase<LC>::iterate(JSContext *cx, JSObject *proxy, unsigned flags, Value *vp)
template<class LC>
bool
ListBase<LC>::hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, bool *bp)
ListBase<LC>::hasInstance(JSContext *cx, JS::HandleObject proxy, JS::MutableHandleValue vp,
bool *bp)
{
*bp = vp->isObject() && js::GetObjectClass(&vp->toObject()) == &sInterfaceClass;
*bp = vp.isObject() && js::GetObjectClass(&vp.toObject()) == &sInterfaceClass;
return true;
}

View File

@ -180,7 +180,7 @@ public:
bool iterate(JSContext *cx, JSObject *proxy, unsigned flags, JS::Value *vp);
/* Spidermonkey extensions. */
bool hasInstance(JSContext *cx, JSObject *proxy, const JS::Value *vp, bool *bp);
bool hasInstance(JSContext *cx, JS::HandleObject proxy, JS::MutableHandleValue vp, bool *bp);
JSString *obj_toString(JSContext *cx, JSObject *proxy);
void finalize(JSFreeOp *fop, JSObject *proxy);